이 모양을 CSS3에서 다시 만들려고합니다. 불행하게도CSS3에서 삼각형 끝난 버튼 모양 다시 만들기
<span><div id="shape"></div></span>
span {
display: block;
margin-left: 88px;
}
#shape {
width: 160px;
height: 100px;
background: #dcdcdc;
}
#shape:before {
height: 76px;
width: 76px;
top: 20px;
content:"";
position: absolute;
border-radius: 10px;
background-color: #ccc;
left: 60px;
-webkit-transform:rotate(45deg);
}
#shape:after {
height: 76px;
width: 76px;
top: 20px;
content:"";
position: absolute;
border-radius: 10px;
left: 220px;
-webkit-transform:rotate(45deg);
background-color: #ccc;
}
, 확장되지 않습니다 : CodePen demo (나는 내가했던 방법을 설명하기 위해 배경-색상을 변경)
이
내 솔루션이었다. 수직으로 확장하는 것이 중요합니다.JavaScript 솔루션도 효과가 있습니다.
당신은 이미 당신이 원하는 이미지를 가지고있다. 왜 그냥 회색 배경을 깎은 후에 사용할 수 없습니까? 당신은 당신을 위해 여러 사이즈를 사용할 수 있습니다. – 11684
어떻게 그것을 확장하고 싶습니까 ?? –
슬프게도 jQuery는 의사 요소의 높이를 직접 설정할 수 없거나 jQuery로 설정할 수있다. 다른 HTML 요소를 추가하려면 jQuery로 쉽게 할 수 있습니다. – robooneus