HTML:扭捏CSS3转换属性
<header>
Header text.
</header>
<main>
Your content here.
</main>
CSS:
header {
position: relative;
background: #5fa3c6;
padding: 8px 10px;
color: #ffffff;
font-size: 20px;
}
header:before {
z-index: -1;
position: absolute;
width: 14px;
height: 14px;
background: #3b6c8a;
content: '';
left: 3px;
bottom: -7px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
main {
margin-left: 10px;
border-left: 1px #5fa3c6 solid;
padding: 10px;
background: #ffffff;
}
小提琴:http://jsfiddle.net/LutJQ/3/
如何能够做到像下面这样?我尝试了变形属性,但没有运气。
你似乎也已经做了很好的工作,形象和小提琴都是一样的(除了颜色,但我不认为这是问题)你想调整什么? –
查看标题的底部,在图像和代码的情况下,曲线和变换不相同。 – theJava
[CSS shapes?](https://css-tricks.com/examples/ShapesOfCSS/) – Jonathan