900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > Web实现:背景颜色渐变色

Web实现:背景颜色渐变色

时间:2020-07-16 05:42:14

相关推荐

Web实现:背景颜色渐变色

HTML部分:

<!DOCTYPE html><html><head><meta charset="utf-8" /><link rel="stylesheet" type="text/css" href="./index.css" /></head><body><button class="publish">我要提问</button></body></html>

CSS部分:

.publish {width: 100%;height: 50px;line-height: 50px;/*渐变方向*/background: linear-gradient(to right, #95ca47, #4dc891);/*从左到右*/background: linear-gradient(to left bottom, #95ca47, #4dc891);/*从右上到左下*//*渐变位置*/background: linear-gradient(to right, #95ca47 30%, #4dc891 70%);/*百分比用来约定渐变的起止位置*/color: #fff;font-size: 18px;border-radius: 4px;font-weight: 500;box-shadow: 0 2px 6px 0 rgba(104, 200, 116, 0.3); /*1*/}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。