当前位置:首页 > 网站应用 > 正文内容

好看的网站自适应图片文字广告位代码

cjw1232个月前 (02-28)网站应用530
<div class="ad">
<!--图片横幅广告-->
<a href="https://cjw123.com/blog/" target="_blank" ><img src="https://y.gtimg.cn/music/photo_new/T053M000003UUUus1HuyfW.gif" width="100%"></a>
<!--自适应文字广告-->
<li><a href="https://cjw123.com/blog/" target="_blank" style="line-height:60px;height:60px;color:#fff;background:#01AAED;text-align:center;font-size:24px;">广告招商 虚位以待</a></li>
<li> <a href="https://cjw123.com/blog/"  target="_blank" style="line-height:60px; height:60px ;color:#fff; background:#2F4056; text-align:center; font-size:24px;" >广告招商 虚位以待</a></li>
</div>

<div class="txtguanggao">
<a href="https://cjw123.com/blog/" target="_blank" class="dh">超低价文字广告位</a>
<a href="https://cjw123.com/blog/" target="_blank" class="dh">超低价文字广告位</a>
<a href="https://cjw123.com/blog/" target="_blank" class="dh">超低价文字广告位</a>
<a href="https://cjw123.com/blog/" target="_blank" class="dh">超低价文字广告位</a>
<a href="https://cjw123.com/blog/" target="_blank" class="dh">超低价文字广告位</a>
<a href="https://cjw123.com/blog/" target="_blank" class="dh">超低价文字广告位</a>
<a href="https://cjw123.com/blog/" target="_blank" class="dh">超低价文字广告位</a>
<a href="https://cjw123.com/blog/" target="_blank" class="dh">超低价文字广告位</a>

</div>
<style>
/**广告位**/
.ad{background:#fff;overflow:hidden;clear:both;border-radius: 6px;}
.ad a{margin:5px;display:block;border-radius:3px;}
.ad img{max-width:100%;}
.ad li{float:left;width:50%;list-style:none;}
@media(max-width:999px) {
.ad{margin: 0 0 10px 0;}
.ad li{width:100%;}
}
/**新增文字广告**/
.txtguanggao{
    width: 100%;
    overflow: hidden;
    display: block;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
}
.txtguanggao a{
    width: calc((100% - 20px) / 4);
    float: left;
    border-radius: 2px;
    line-height: 35.35px;
    height: 35.35px;
    text-align: center;
    font-size: 14px;
    color: #fff;
    display: inline-block;
    background-color: rgb(255, 153, 159);
    margin: 2.5px;
    
    transition-duration: .3s;
}
.txtguanggao a:nth-child(1) {
    background-color: #dc3545;
}
.txtguanggao a:nth-child(2) {
    background-color: #007bff;
}
.txtguanggao a:nth-child(3) {
    background-color: #28a745;
}
.txtguanggao a:nth-child(4) {
    background-color: #ffc107;
}
.txtguanggao a:nth-child(5) {
    background-color: #28a745;
}
.txtguanggao a:nth-child(6) {
    background-color: #ffc107;
}
a {

  text-decoration: none;

}
.txtguanggao a:nth-child(7) {
    background-color: #dc3545;
}
.txtguanggao a:nth-child(8){
    background-color: #007bff;
}
.txtguanggao a:hover{
background:#FF2805;color:#FFF
}
@media screen and (max-width: 1000px) {
.txtguanggao a{
   width: calc((100% - 10px) / 2);
    float: left;
    border-radius: 2px;
    line-height: 35.35px;
    height: 35.35px;
    text-align: center;
    font-size: 14px;
    color: #fff;
    display: inline-block;
    background-color: rgb(255, 153, 159);
    margin: 2.5px;
    transition-duration: .3s;
}
}
  @media screen and (min-width: 1000px) {
    .txtguanggao a{
    width: calc((100% - 20px) / 4);
    }}
</style>


扫描二维码推送至手机访问。

版权声明:本文由追求完美发布,如需转载请注明出处。

本文链接:https://cjw123.com/blog/?id=72

分享给朋友:

相关文章

网站调整公告

        网站开通了也有三年多了,网站也进行了多次的改版,昨天是我生日嫌着没事在家里把网站再进行了一次改版,当大家再次访问网站时,网站已经换上了全新的衣裳,这次的改版也将意味着我自己也会以一个全新的面貌展现,在我过去的一岁里...

html meta标签屏蔽搜索引擎的用法

html页面中的 meta 标签可以用来识别搜索引擎的蜘蛛类型,可以规定meta标签所在的html页面是否被蜘蛛抓取,下面是这个meta标签的用法,大家可以借鉴一下。搜索引擎的 meta 标签的解析下面是meta标签对搜索引擎的解析<meta name='robot...

CSS头像的花式悬停效果

<html><head><style>img { --s:280px; /* image size */    --b:5px; /* border thic...

js文字定时向上滚动特效代码

<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <t...

zblogphp二级目录建站,伪静态规则怎么写

如果你的 Z-BlogPHP 站点安装在二级目录中,需要使用伪静态技术来优化站点的 URL,并提升搜索引擎蜘蛛的抓取效率。下面是一个 nginx 的伪静态规则示例:# 子目录规则要排在前边; location /sub/ {    &n...

纯CSS实现菜单炫酷点击展开收起效果

通过纯css3实现展开收缩的弹性动画菜单,可以应用于PC端或移动端页面中,非常实用效果也非常的炫酷,喜欢的码友们可以尝试一下,效果如下:完整代码如下:<!doctype html><html><head><meta charset=&qu...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。