【发布时间】:2019-01-30 15:15:33
【问题描述】:
尝试仅使用HTML CSS 创建位置标记图钉
我想要的(仅限 Pin):
我能够管理的 (fiddle) :
body {
background: #e6e6e6;
}
.pin {
width: 20px;
height: 20px;
border-radius: 50% 50% 50% 0;
background: #CA091A;
position: absolute;
transform: rotate(-45deg);
left: 50%;
top: 50%;
margin: -10px 0 0 -15px;
}
.pin-label {
width: 16px;
height: 13px;
font-size: 10px;
font-weight: bold;
margin: 3px 0 0 2px;
background: #fff;
text-align: center;
padding-top: 2px;
position: absolute;
border-radius: 50%;
transform: rotate(45deg);
}
.bounce {
animation-name: bounce;
animation-fill-mode: both;
animation-duration: 1s;
}
<div class='pin bounce'>
<span class='pin-label'>RU</span>
</div>
<div class='pulse'></div>
问题:引脚指针不够长。
是否只能使用HTML CSS?。
【问题讨论】:
-
@A.Sakkeer 两个链接都断开了
404 -
https:// 放这个,检查一下
标签: html css css-transitions css-transforms