css模拟阴影和小三角

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>css模拟阴影和小三角</title>
<style>
a{ color:#666; text-decoration:none; line-height:25px; text-indent:24px;}
.w{ width:200px; position:absolute; background:#999; left:400px; top:200px; font-size:12px; text-align:left}/*模拟灰色阴影背景层*/
.h{ width:200px; position:absolute; background:#999; left:400px; top:300px; font-size:12px; text-align:left}/*模拟灰色阴影背景层*/
.x{ width:180px; position:relative; background:#ff9;  border:1px solid #F96; padding:10px; left:-4px; top:-4px;}/*内容div*/
.y , .z{position:absolute; top:20px;}/*控制三角的位置上下左右*/
.y{ color:#ff9;  left:183px; font-size:34px;}/*模拟小三角*/
.z{ color:#f96;  left:185px;font-size:34px;}/*模拟小三角*/


.a , .b{position:absolute; top:20px;}/*控制三角的位置上下左右*/
.a{ color:#ff9;  left:-16px; font-size:34px;}/*模拟小三角*/
.b{ color:#f96;  left:-18px;font-size:34px;}/*模拟小三角*/


.l680{ left:680px;}
.t400{ top:400px;}
</style>
</head>
<body>
<div class="w">
<div class="x"><p><a href="#">用面向对象的思想去书写css,用面向对象的心态去书写css。(右三角)</a></p>
<div class="z">◆</div>
<div class="y">◆</div>
</div>
</div>

<div class="h">
<div class="x"><p><a href="#">用面向对象的思想去书写css,用面向对象的心态去书写css。(左三角)</a></p>
<div class="b">◆</div>
<div class="a">◆</div>
</div>
</div>

</body>
</html>

转载于:https://www.cnblogs.com/wuchao288/p/3273567.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值