纯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清除浮动 万能float闭合
下一篇:
纯CSS做的带开关的台灯