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.2326.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0