【发布时间】:2015-07-20 22:35:45
【问题描述】:
我已经使用左边框和下边框为引导导航栏创建了一种单边平行四边形形状,但我还需要在保持左侧透明的同时将右侧弯曲。
目前的结果:
想要的结果:
我尝试过使用border-top-right-radius,但没有任何反应:
.navbar {
position: relative;
min-height: 50px;
margin-bottom: 20px;
border: 1px solid transparent;
height: 20px;
width: 100px;
border-bottom: 50px solid rgba(58, 162, 178, 0.5);
border-left: 50px solid transparent;
/* Tried */
border-top-right-radius: 2em;
}
我在这里做了一个JSFiddle:http://jsfiddle.net/6qfbhxty/
【问题讨论】:
-
你的 jsfiddle 显示了你想要的结果
-
仅作为我在paint中创建的图像。
-
结果取决于浏览器,你需要添加你所拥有的
-webkit-border-top-right-radius: 2em; -moz-border-radius-topright: 2em; border-top-right-radius: 2em;来考虑webkit浏览器和firefox
标签: html css css-shapes