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>

相关推荐
springfe01012 分钟前
构建大顶堆
前端·算法
陈随易2 分钟前
一行代码,将网页元素变成图片!比 html2canvas 快 93 倍的截图神器来了!
前端·后端·程序员
小桥风满袖3 分钟前
Three.js-硬要自学系列29之专项学习透明贴图
前端·css·three.js
lzdy5 分钟前
TypeScript学习指北
前端
沉香亭北5 分钟前
vueRouter
前端
土豪码农5 分钟前
面试官:怎么禁止用户复制?
前端·javascript·面试
掘金安东尼6 分钟前
🧭 前端周刊第417期(2025年6月2日–6月8日)
前端·javascript·面试
我是若尘6 分钟前
BEM 规范 :前端 CSS 模块化开发之道
前端
日升7 分钟前
AI 组件库-MateChat 快速起步与核心概念
前端·ai编程·trae
玲小珑8 分钟前
Auto.js 入门指南(八)高级控件与 UI 自动化
android·前端