好看的網站自適應圖片文字廣告位代碼

廣告也精彩
好看的網站自適應圖片文字廣告位代碼

上邊是圖片廣告位,下邊是文字廣告位,適用于所有網站。

發現了一些問題進行了修復,修復內容:圖片廣告位如果圖片小顯示會異常,文字存在下劃線。

一個好的廣告位不僅不會拉低網站的顏值,還會增加廣告主選擇你的機會。

廣告位代碼適配一下自己的網站效果會更好哦。

<div class="ad">
<!--圖片橫幅廣告-->
<a  target="_blank" ><img src="https://y.gtimg.cn/music/photo_new/T053M000003UUUus1HuyfW.gif" width="100%"></a>
<!--自適應文字廣告-->
<li><a  target="_blank" style="line-height:60px;height:60px;color:#fff;background:#01AAED;text-align:center;font-size:24px;">廣告招商 虛位以待</a></li>
<li> <a   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  target="_blank" class="dh">超低價文字廣告位</a>
<a  target="_blank" class="dh">超低價文字廣告位</a>
<a  target="_blank" class="dh">超低價文字廣告位</a>
<a  target="_blank" class="dh">超低價文字廣告位</a>
<a  target="_blank" class="dh">超低價文字廣告位</a>
<a  target="_blank" class="dh">超低價文字廣告位</a>
<a  target="_blank" class="dh">超低價文字廣告位</a>
<a  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>
? 版權聲明

相關文章

暫無評論

none
暫無評論...