0

can be done a slice between two divs in CSS like the following photo ? enter image description here

I tried to google it but didn't found anything usefull for my problem

Thanks !

4

1 回答 1

0

我建议你用image.
但是如果你想用 css 做,这里是例子,

css

.parallelogram { width: 150px; height: 100px; -webkit-transform: skew(20deg);   
-moz-transform: skew(20deg); -o-transform: skew(20deg); background: red;   
float:left;margin-left:18px;margin-right:8px;}
.parallelogram2 { width: 150px; height: 100px; -webkit-transform: skew(20deg);   
-moz-transform: skew(20deg); -o-transform: skew(20deg); background: Black;float:left; }

html

<div class="parallelogram"></div>
<div class="parallelogram2"></div>

小提琴的例子!

您可以在此处此处查看并了解 CSS 形状的工作原理!
祝你好运 !

于 2013-08-02T11:48:11.410 回答