css画十字架和靶心图标

.bottom {

position: absolute;

top: 230px;

/* left: 10px; */

}

.bottom button {

width: 30px;

height: 30px;

cursor: pointer;

border: none;

background: transparent;

/* color: #333;

box-shadow: 0px 1px 10px 2px rgb(10 10 10 / 50%);

padding-left: 10px;

border-radius: 50%;

font-size: 30px;*/

}

.cross {

width: 30px;

height: 30px;

position: relative;

}

.cross::before, .cross::after {

content: ""; /* 伪元素,用来绘制十字架的两条线 */

position: absolute; /* 绝对定位 */

width: 26px;

height: 4px;

background-color: #333; /* 设置为黑色 */

left: 0;

top: 16px;

}

.cross::before {

transform: rotate(90deg); /* 将第一条线旋转45度 */

}

.cross::after {

transform: rotate(-180deg); /* 将第二条线旋转-45度 */

}

.round4,.round5{

border-radius: 50%;

background-color: #333;

position: absolute;

z-index: 1;

}

.round4{

width: 20px;

height: 20px;

top: 8px;

left: 3px;

}

.round5{

width: 8px;

height: 8px;

border: 4px solid #fff;

margin: 2px 0 0 2px;

z-index: 1;

}

<div class="bottom">

<button id="centerPosition">

<!-- <div class="coordinate"></div>

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

<div class="cross"></div>

<div class="round4">

<div class="round5">

</div>

</div>

</button>

</div>

相关推荐
我是何平7 分钟前
🧠 用 JavaScript 理解算法复杂度:时间复杂度与空间复杂度详解
前端
SuperEugene12 分钟前
接口类型管理:从 any 到有组织的 api.d.ts
前端·面试·typescript
喝咖啡的女孩12 分钟前
React Hook & Class
前端
小呆呆_小乌龟12 分钟前
同样是定义对象,为什么 TS 里有人用 interface,有人用 type?
前端·react.js
Forever7_13 分钟前
仅用一个技巧,让 JavaScript 性能提速 500%!
前端·vue.js
慢慢长大的孩子18 分钟前
个人运营小网站的最佳策略
前端·后端
牛奶35 分钟前
ts随笔:基础与类型系统
前端·面试·typescript
牛奶1 小时前
JS随笔:浏览器 API(DOM 与 BOM)
前端·javascript·面试
用泥种荷花1 小时前
【LangChain.js学习】 会话记忆(临时/长期)全解析
前端
慢慢长大的孩子1 小时前
原生Android开发与JS桥开发对比分析
前端·后端