Qihuan 发表于 2021-5-15 08:31

百变鹏仔缤纷文字广告位代码美化版

PC端时代码为8个文字块一行,H5为4个文字代码一行,所以大家添加文字广告为8、16、24...... 只要是8的倍数即可,当然推荐添加2行效果最好。

暗黑模式:



将CSS与HTML放置需要展示的地方即可,在修改对应的a标签的内容,跳转地址就OK了。
<!doctype html>
<html lang="en">
<head>
        <meta charset="UTF-8">
        <title>文字广告</title>
<style type="text/css">
        *{margin: 0;}
        body{padding: 50px 100px;box-sizing: border-box;}
        .tp-ad-text1 {width:100%;padding-top:6px;box-sizing:border-box;overflow: hidden;background: rgba(255,255,255,.2);}
        .tp-ad-text1 a {color:#7fba00;font-size:14px;line-height:38px;text-align:center;border:1px dashed rgba(0,0,0,.2);padding:0 3px;box-sizing:border-box;float:left;width:11.5%;height:38px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0 0.5% 6px;text-decoration:none;transition:all .6s;}
        .tp-ad-text1 a:hover {font-weight: bold;color:#fff!important;background:#7fba00;transition: all .6s;}
        .tp-ad-text1 a:nth-child(2n) {color:#f74e1e;}
        .tp-ad-text1 a:nth-child(2n):hover {background:#f74e1e;border-color: #f74e1e;}
        .tp-ad-text1 a:nth-child(3n) {color:#00a4ef;}
        .tp-ad-text1 a:nth-child(3n):hover {background:#00a4ef;border-color: #00a4ef;}
        .tp-ad-text1 a:nth-child(4n) {color:#0517c2;}
        .tp-ad-text1 a:nth-child(4n):hover {background:#0517c2;border-color: #0517c2;}
        .tp-ad-text1 a:nth-child(5n) {color:#601165;}
        .tp-ad-text1 a:nth-child(5n):hover {background:#601165;border-color: #601165;}
        .tp-ad-text1 a:nth-child(6n) {color:#ffb900;}
        .tp-ad-text1 a:nth-child(6n):hover {background:#ffb900;border-color: #ffb900;}
        .tp-ad-text1 a:nth-child(7n) {color:#0fc317;}
        .tp-ad-text1 a:nth-child(7n):hover {background:#0fc317;border-color: #0fc317;}
        .tp-ad-text1 a:nth-child(8n) {color:#601165;}
        .tp-ad-text1 a:nth-child(8n):hover {background:#601165;border-color: #601165;}
        .tp-ad-text1 a:nth-child(9n) {color:#fba78f;}
        .tp-ad-text1 a:nth-child(9n):hover {background:#fba78f;border-color: #fba78f;}
        .tp-ad-text1 a:nth-child(10n) {color:#13cf8f;}
        .tp-ad-text1 a:nth-child(10n):hover {background:#13cf8f;border-color: #13cf8f;}
        .tp-ad-text1 a:nth-child(11n) {color:#f74e1e;}
        .tp-ad-text1 a:nth-child(11n):hover {background:#f74e1e;border-color: #f74e1e;}
        .tp-ad-text1 a:nth-child(12n) {color:#ffb900;}
        .tp-ad-text1 a:nth-child(12n):hover {background:#ffb900;border-color: #ffb900;}
        .tp-ad-text1 a:nth-child(13n) {color:#fba78f;}
        .tp-ad-text1 a:nth-child(13n):hover {background:#fba78f;border-color: #fba78f;}
        .tp-ad-text1 a:nth-child(14n) {color:#f74e1e;}
        .tp-ad-text1 a:nth-child(14n):hover {background:#f74e1e;border-color: #f74e1e;}
        .tp-ad-text1 a:nth-child(15n) {color:#7fba00;}
        .tp-ad-text1 a:nth-child(15n):hover {background:#7fba00;border-color: #7fba00;}
        .tp-ad-text1 a:nth-child(16n) {color:#0fc317;}
        .tp-ad-text1 a:nth-child(16n):hover {background:#0fc317;border-color: #0fc317;}
        .tp-ad-text1 a:nth-child(17n) {color:#0517c2;}
        .tp-ad-text1 a:nth-child(17n):hover {background:#0517c2;border-color: #0517c2;}
        .tp-ad-text1 a:nth-child(18n) {color:#13cf8f;}
        .tp-ad-text1 a:nth-child(18n):hover {background:#13cf8f;border-color: #13cf8f;}
        .tp-ad-text1 a:nth-child(19n) {color:#ffb900;}
        .tp-ad-text1 a:nth-child(19n):hover {background:#ffb900;border-color: #ffb900;}
        .tp-ad-text1 a:nth-child(20n) {color:#f74e1e;}
        .tp-ad-text1 a:nth-child(20n):hover {background:#f74e1e;border-color: #f74e1e;}
        @media screen and (max-width: 1198px){
                .tp-ad-text1 a{
                        width: 24%;
                }
        }
</style>
</head>
<body>
    <div class="tp-ad-text1">
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="百变鹏仔" target="_blank">百变鹏仔</a>
      <a href="http://baidu.com/" title="www.qihuank.cn" target="_blank">七幻论坛www.qihuank.cn</a>
    </div>
</body>
</html>

t4zaq1j2lvsgw0a 发表于 2021-7-18 23:13

激动人心,无法言表!

cpr6ddm6w5nf0ui 发表于 2021-7-18 23:21

看到这帖子真是高兴!

6qhxn0u9sxx50bu 发表于 2021-7-19 14:42

真是被感动的痛哭流涕……

8jfzd0pkjvj3ls1 发表于 2021-7-19 14:53

激动人心,无法言表!

艾秀杰 发表于 2021-7-19 15:02

太生气了,无法HOLD啦 >_<......

卫婉秀 发表于 2021-7-19 15:04

强烈支持楼主ing……

7vaf2ux6rafr6uq 发表于 2021-7-19 15:04

无回帖,不论坛,这才是人道。|

ma7p392e95 发表于 2021-7-19 15:13

感恩无私的分享与奉献 :)

吉4673 发表于 2021-7-19 15:38

无回帖,不论坛,这才是人道。|
页: [1] 2 3 4 5 6 7 8 9 10
查看完整版本: 百变鹏仔缤纷文字广告位代码美化版