Angbike个人博客 > Html+Css > CSS简单实现地图定位图标

CSS简单实现地图定位图标

HTML代码:

<div class="coordinate"></div>
<div class="point"></div>

CSS代码:

.coordinate{
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0,.5);
    border-radius: 50% 50% 50% 0;
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -o-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
}
.coordinate:after{
    content: '';
    position: absolute;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    background-color: rgba(0, 0, 0,.5);
    margin: 8px 0 0 8px;
}
.point{
    background: rgba(0,0,0,.2);
    border-radius: 50%;
    height: 14px;
    width: 14px;
    margin: 0px 0 0 8px;
    -webkit-transform: rotateX(55deg);
    -moz-transform: rotateX(55deg);
    -o-transform: rotateX(55deg);
    -ms-transform: rotateX(55deg);
    transform: rotateX(55deg);
}

效果截图:
1.png

博客评论已关闭