手机
当前位置:查字典教程网 >网页设计 > Div+Css教程 >纯CSS定义双色文字
纯CSS定义双色文字
摘要:.textBottom{color:#0000cc;position:absolute;left:3em;top:1em;font:26px...

<style type="text/css">
.textBottom {
color: #0000cc;
position: absolute;
left: 3em;
top: 1em;
font: 26px Century Gothic,Arial, Helvetica, sans-serif;
clip: rect(18px auto auto auto);
}
.textTop {
color: #ff0000;
position: absolute;
left: 3em;
top: 1em;
font: 26px Century Gothic,Arial, Helvetica, sans-serif;
clip: rect(0 auto 18px 0);
}
.container {
width: 28em;
height: 5em;
margin: 1em auto;
position: relative;
}
</style>
</head>
<body>
<div class="container">
<a href="#" class="textTop">Cascading Style Sheet </a>
<a href="#" class="textBottom">Cascading Style Sheet </a>
</div>

【纯CSS定义双色文字】相关文章:

CSS实现绝对底部

CSS如何控制网页(WEB)字体

5个CSS书写技巧

CSS中em和px的区别

CSS兼容方案最新的一些技巧

CSS制作11种风格不同的特效文字

CSS定位机制之一:普通流

CSS兼容:如何兼容IE7和IE8-Div+CSS教程

CSS文字竖排方法

CSS网页布局实用小技巧

精品推荐
分类导航