我希望有人可以帮我解决一个CSS问题...
我使用listview来显示一些结果,需要有一个分组的概念,为了实现这一点,我使用2组背景颜色交替.我正在尝试为这些元素添加边框,但由于边框顶部和边框左边可能是不同的颜色,有没有办法删除它们相遇的三角形?
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
p
{
border-top:10px solid red;
border-left:10px solid white;
border-bottom-style:dotted;
border-left-style:solid;
}
</style>
</head>
<body>
<p>2 different border styles.</p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
san*_*eep 11
你可以像这样写:
p{
width:200px;
height:200px;
background:red;
border-left:5px solid pink;
-moz-box-shadow:inset 0 5px green;
box-shadow:inset 0 5px green;
}
Run Code Online (Sandbox Code Playgroud)
检查这个http://jsfiddle.net/nRWux/1/
box-shaow在IE8及以下版本无效.