
一个好看自适应的文字广告位代码,如果不需要太多位置可适当删减代码。
<style type="text/css">
/* 多色循环闪烁动画 */
@keyframes colorBlink {
0% { color: #ff4400; border-color: #ff4400; }
20% { color: #ff8c00; border-color: #ff8c00; }
40% { color: #ffd700; border-color: #ffd700; }
60% { color: #32cd32; border-color: #32cd32; }
80% { color: #1e90ff; border-color: #1e90ff; }
100%{ color: #9932cc; border-color: #9932cc; }
}
/* 多色闪烁标题样式 */
.title-blink {
font-size: 16px;
text-align: center;
margin: 8px 0;
padding-bottom: 8px;
/* 文字+下划线 同步多色闪烁 */
animation: colorBlink 1.8s infinite alternate;
border-bottom: 2px solid; /* 动态颜色下划线 */
font-weight: bold;
}
.tp-ad-text1 {
width: 100%;
padding-top: 6px;
box-sizing: border-box;
overflow: hidden;
background: #ffffff; /* 纯白色背景 */
}
.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;
}
/* 循环彩色方案(10色循环,不重叠) */
.tp-ad-text1 a:nth-child(10n+1) { color:#7fba00; }
.tp-ad-text1 a:nth-child(10n+2) { color:#f74e1e; }
.tp-ad-text1 a:nth-child(10n+3) { color:#00a4ef; }
.tp-ad-text1 a:nth-child(10n+4) { color:#0517c2; }
.tp-ad-text1 a:nth-child(10n+5) { color:#601165; }
.tp-ad-text1 a:nth-child(10n+6) { color:#ffb900; }
.tp-ad-text1 a:nth-child(10n+7) { color:#0fc317; }
.tp-ad-text1 a:nth-child(10n+8) { color:#fba78f; }
.tp-ad-text1 a:nth-child(10n+9) { color:#13cf8f; }
.tp-ad-text1 a:nth-child(10n+10){ color:#f74e1e; }
/* 悬浮效果(对应颜色自动匹配) */
.tp-ad-text1 a:nth-child(10n+1):hover { background:#7fba00; border-color:#7fba00; }
.tp-ad-text1 a:nth-child(10n+2):hover { background:#f74e1e; border-color:#f74e1e; }
.tp-ad-text1 a:nth-child(10n+3):hover { background:#00a4ef; border-color:#00a4ef; }
.tp-ad-text1 a:nth-child(10n+4):hover { background:#0517c2; border-color:#0517c2; }
.tp-ad-text1 a:nth-child(10n+5):hover { background:#601165; border-color:#601165; }
.tp-ad-text1 a:nth-child(10n+6):hover { background:#ffb900; border-color:#ffb900; }
.tp-ad-text1 a:nth-child(10n+7):hover { background:#0fc317; border-color:#0fc317; }
.tp-ad-text1 a:nth-child(10n+8):hover { background:#fba78f; border-color:#fba78f; }
.tp-ad-text1 a:nth-child(10n+9):hover { background:#13cf8f; border-color:#13cf8f; }
.tp-ad-text1 a:nth-child(10n+10):hover{ background:#f74e1e; border-color:#f74e1e; }
.tp-ad-text1 a:hover {
font-weight: bold;
color: #fff !important;
}
/* 响应式 */
@media screen and (max-width: 1198px){
.tp-ad-text1 a{ width: 24%; }
}
</style>
<!-- 多色闪烁标题 + 多色闪烁下划线 -->
<div class="title-blink">亦刀资源网,好资源来分享,官方网址:www.ydao86.cn</div>
<div class="tp-ad-text1">
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">雨云服务器</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">同款网站搭建</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">同款网站搭建</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">同款网站搭建</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
<a href="https://www.ydao86.cn" title="亦刀资源网" target="_blank">广告位/10/月</a>
</div>
<div class="txtguanggao">
<a href="https://www.ydao86.cn" target="_blank" class="dh">超低价文字广告位</a>
<a href="https://www.ydao86.cn" target="_blank" class="dh">超低价文字广告位</a>
<a href="https://www.ydao86.cn" target="_blank" class="dh">超低价文字广告位</a>
<a href="https://www.ydao86.cn" target="_blank" class="dh">超低价文字广告位</a>
</div>
<style>
/**新增文字广告**/
.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;
}
a {
text-decoration: none;
}
.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>








