网站顶部添加色彩渐变全屏广告效果代码

   声明:本站部分内容来自互联网,如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

29

image.png

第一步:添加前端DIV代码

<div class="top-notice-word"><a data-b="huodong" href="#" target="_blank" class="top-notice-word-link">这里是你要自定义的内容</a></div>

在将以上代码复制到自己网站前端需要放置此效果的位置;并修改其中的文字显示内容;

第二步:添加DIV对应的样式;

.top-notice-word{width: 100%;line-height: 40px;font-size: 14px;color: #ffffff;text-align: center;background: -o-linear-gradient(left, #ff6c00, #a200ff);background: -webkit-gradient(linear, left top, right top, from(#ff6c00), to(#a200ff));background: linear-gradient(to right, #ff6c00, #a200ff);overflow-x: hidden;}

在复制上述样式文件后,放到自己网站的整站通用CSS里面即可;操作很简单,满足自己想要的效果最重要;