当前位置:奉上博客 » 站长之家 » 正文

WordPress美化-文字翻转广告位

代码自行选择广告地方

<div class="textwidget custom-html-widget"><style>
	.text-block{
		width: 100%;
		overflow: hidden;
		background: rgba(255,255,255,.0);
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
	}
	.text-block a{
		color: rgba(0,0,0,.6);
		font-size: 16px;
		font-weight: bold;
		line-height: 30px;
		text-align: center;
		text-decoration: none;
		display: block;
		width: 50%;
		height: 35px;
		overflow: hidden;
		position: relative;
		margin: 1px 0;
	}
	.text-block a div{
		width: 100%;
		height: 60px;
		padding: 0 5px;
		box-sizing: border-box;
		position: absolute;
		top: 0;
		left: 0;
		transition: all .3s;
	}
	.text-block a:hover div{
		transition: all .3s;
		color: #fff;
		top: -30px;
		text-shadow: 0 2px 3px rgba(0,0,0,.6);
	}
	.text-block p{
		width: 100%;
		white-space: nowrap;
	    overflow: hidden;
	    text-overflow: ellipsis;
	}
	.text-block a div :nth-child(1){
	    background: linear-gradient(to right,#b4b4ff, #aedefc);
	}
	.text-block a div :nth-child(2){
	    background: linear-gradient(to right,#aedefc,#b4b4ff);}
</style><div class="text-block">
	<a target="_blank" href=" " rel="noopener">
		<div>
			<p>限时招租</p>
			<p>点击访问</p>
		</div>
	</a>
	<a target="_blank" href=";" rel="noopener">
		<div>
			<p>限时招租</p>
			<p>点击访问</p>
		</div>
	</a>
	<a target="_blank" href=";" rel="noopener">
		<div>
			<p>奉上建站日记</p>
			<p>点击访问</p>
		</div>
	</a>
	<a target="_blank" href="https://www.muziz.cn" rel="noopener">
		<div>
			<p>限时招租</p>
			<p>点击访问</p>
		</div>
	</a>
	<a target="_blank" href=";" rel="noopener">
		<div>
			<p>限时招租</p>
			<p>点击访问</p>
		</div>
	</a>
	<a target="_blank" href=";" rel="noopener">
		<div>
			<p>广告招租</p>
			<p>点击咨询</p>
		</div>
	</a>
	<a target="_blank" href=";" rel="noopener">
		<div>
			<p>广告招租</p>
			<p>点击咨询</p>
		</div>
	</a>
	<a target="_blank" href=";" rel="noopener">
		<div>
			<p>广告招租</p>
			<p>点击咨询</p>
		</div>
	</a>
	<a target="_blank" href=";" rel="noopener">
		<div>
			<p>广告招租</p>
			<p>点击咨询</p>
		</div>
	</a>
	<a target="_blank" href=";" rel="noopener">
		<div>
			<p>广告招租</p>
			<p>点击咨询</p>
		</div>
	</a>
</div></div>

WordPress美化-文字翻转广告位

相关文章