以下CSS3轉角色帶適用於桌面版Chrome,但如果您在iPad上打開它,則不會旋轉。CSS轉角色帶未在iPad中旋轉(Chrome)
http://jsfiddle.net/u6hqte8s/1/
.ribbon {
position: absolute;
left: -5px;
top: -5px;
z-index: 1;
overflow: hidden;
width: 70px;
height: 70px;
text-align: right;
}
.ribbon span {
font-size: 10px;
font-weight: bold;
background-color: #f1f1f1;
color: #000000;
text-transform: uppercase;
text-align: center;
line-height: 15px;
transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
width: 90px;
display: block;
box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);
-webkit-box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);
-moz-box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);
position: absolute;
top: 10px;
left: -15px;
}
.ribbon span::before {
content: "";
position: absolute;
left: 0px;
top: 100%;
z-index: -1;
border-left: 3px solid #bbbbbb;
border-right: 3px solid transparent;
border-bottom: 3px solid transparent;
border-top: 3px solid #bbbbbb;
}
.ribbon span::after {
content: "";
position: absolute;
right: 0px;
top: 100%;
z-index: -1;
border-left: 3px solid transparent;
border-right: 3px solid #bbbbbb;
border-bottom: 3px solid transparent;
border-top: 3px solid #bbbbbb;
}
<div class="ribbon"><span>Test</span>
</div>
我怎樣才能解決呢?