手机
当前位置:查字典教程网 >网页设计 > 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自定义鼠标显示的形状

DIV+CSS 分享学习心得 导航篇

详解CSS的规范及技巧

CSS实现绝对底部

定义渐变边框给图片加阴影

总结CSS简写方法

用CSS+JS实现Li背景颜色交替

用CSS设计高用户体验的web文字大小

DIV+CSS表单布局的五个小技巧

精品推荐
分类导航