手机
当前位置:查字典教程网 >网页设计 > 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让文字居于div的底部

CSS语法手册(五)颜色和背景属性

纯语义化XHTML CSS设计表单方法

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

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

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

CSS定位机制之一:普通流

CSS定义DIV圆角边框

CSS改变文字被选择时的背景颜色

酷酷的变色菜单

精品推荐
分类导航