纯CSS定义双色文字
<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>
本文网址:https://www.dedexuexi.com/divcss/jc/2147.html
本站部分文章搜集与网络,如有侵权请联系本站,转载请说明出处。