网页代码库


其它代码

利用CSS创造多彩文字

看看效果 2008.10.15

xhtml部分

<div class="text">
	<a class="textTop" href="#">Cascading Style Sheet</a>
	<a class="textBottom" href="#">Cascading Style Sheet</a>
</div>

css部分

.text {
	position: relative;
	margin: 1em auto;
	width: 28em;
	height: 5em;
	background: #f6f6f6;
	color: #333333;
	line-height: 140%;
	font-family: "Century Gothic",Arial, Helvetica, sans-serif;
}
.text a {
	text-decoration: none
}
.textBottom {
	position: absolute;
	top: 1em;
	left: 3em;
	clip: rect(14px,auto,auto,auto);
	font-size: 26px;
	color: #333333;
}
.textTop {
	position: absolute;
	top: 1em;
	left: 3em;
	clip: rect(0px,auto,14px,0px);
	font-size: 26px;
	color: #cc0000;
}
.textTop:hover {
	COLOR: #808080;
}
.textBottom:hover {
	COLOR: #ff4646;
}

关于我

站长:皮成,致力于web前端技术。

网站:收集以web前端技术实现的网页实例,探讨网页实例背后的web前端技术。

Email:Strict.dtd[at]Gmail.com QQ:52541666