css+svg实现悬浮提示框效果代码
代码语言:html
所属分类:弹出层
代码描述:css+svg实现悬浮提示框效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;700&display=swap");
body {
align-items: center;
background-color: #5f9a74;
display: flex;
font-family: "Source Sans Pro", sans-serif;
height: 100vh;
justify-content: center;
}
.container {
background-color: #fff;
border-radius: 12px;
box-shadow: 0 2px 3.6px rgba(0, 0, 0, 0.023),
0 5.6px 10px rgba(0, 0, 0, 0.028), 0 13.6px 24.1px rgba(0, 0, 0, 0.034),
0 45px 80px rgba(0, 0, 0, 0.06);
margin: 0 20px;
max-width: 500px;
padding: 20px 16px;
}
.title {
display: flex;
font-size: 28px;
font-weight: bold;
margin-bottom: 4px;
}
.title--spacing {
margin-top: 16px;
}
.tooltip {
font-size: 16px;
font-weight: normal;
margin-top: 2px;
position: relative;
}
.tooltip:hover {
cursor: help;
}
.tooltip-spacing {
height: 20px;
margin: 8px;
position: relative;
width: 20px;
}
.tooltip-bg1 {
background-color: #000;
border-radius: 10px;
content: " ";
display: flex;
height: 20px;
position: absolute;
top: 0;
width: 20px;
}
.tooltip-bg2 {
background-color: #fff;
border-radius: 8px;
content: " ";
display: flex;
height: 16px;
left: 2px;
position: absolute;
top: 2px;
width: 16px;
}
.tooltip-text {
font-size: 14px;
font-weight: bold;
line-height: 20px;
position: relative;
text-align: center;
width: 20px;
}
.bubble {
clip-path: path(
"M 201.23862,50.748829 A 0.006,0.006 0 0 1 201.23262,50.754829 0.006,0.006 0 0 1 201.22662,50.748829 0.006,0.006 0 0 1 201.23262,50.742829 0.006,0.006 0 0 1 201.23862,50.748829 M 191.85968,17.069946 A 0.006,0.006 0 0 1 191.85368,17.075946 0.006,0.006 0 0 1 191.84768,17.069946 0.006,0.006 0 0 1 191.85368,17.063946 0.006,0.006 0 0 1 191.85968,17.069946 M 161.59133,52.880402 A 0.006,0.006 0 0 1 161.58533,52.886402 0.006,0.006 0 0 1 161.57933,52.880402 0.006,0.006 0 0 1 161.58533,52.874402 0.006,0.006 0 0 1 161.59133,52.880402 M 138.57033,11.101538 A 0.006,0.006 0 0 1 138.56433,11.107538 0.006,0.006 0 0 1 138.55833,11.101538 0.006,0.006 0 0 1 138.56433,11.095538 0.006,0.006 0 0 1 138.57033,11.101538 M 113.84406,50.322514 A 0.006,0.006 0 0 1 113.83806,50.328514 0.006,0.006 0 0 1 113.83206,50.322514 0.006,0.006 0 0 1 113.83806,50.316514 0.006,0.006 0 0 1 113.84406,50.322514 M 102.33355,21.333096 A 0.006,0.006 0 0 1 102.32755,21.339096 0.006,0.006 0 0 1 102.32155,21.333096 0.006,0.006 0 0 1 102.32755,21.327096 0.006,0.006 0 0 1 102.33355,21.333096 M 64.391521,55.864605 A 0.006,0.006 0 0 1 64.385521,55.870605 0.006,0.006 0 0 1 64.379521,55.864605 0.006,0.006 0 0 1 64.385521,55.858605 0.006,0.006 0 0 1 .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0