代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
:root {
--icon-color: black;
}
.danger {
--icon-color: red;
}
.alert {
--icon-color: orange;
}
.success {
--icon-color: green;
}
.icon-container {
display: none;
}
.container {
position: relative;
text-align: center;
}
h2 {
padding: 0 0.5em;
margin-bottom: 0;
}
svg {
display: inline-block;
width: 80px;
height: 80px;
margin: 10px auto;
}
</style>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" class="icon-container">
<symbol id="close-icon" viewbox="0 0 200 200">
<circle cx="96" cy="96" r="88" fill="none" stroke="var(--icon-color)" stroke-width="15" />
<text x="100" y="160" fill="var(--icon-color)" text-anchor="middle" style="font-size:250px;">x</text>
</symbol>
</svg>
<div class="container">
<h2>Default Icon</h2>
<svg role="img">
<title>Close Dialog</title>
<use xlink:href="#close-icon" />
</svg>
<div class="danger">
<h2>Danger Icon</h2>
<svg role="img">
<title>Close Danger Dialog</title>
<use xlink:href="#close-icon" />
</svg>
</div>
<div class="success">
<h2>Success Icon</h2>
<svg role="img">
<title>Close Success Dialog</title>
<use xlink:href="#close-icon" />
</svg>
</div>
<div class="alert">
<h2>Alert Icon</h2>
<svg role="img">
<title>Close Alert Dialog</title>
<use xlink:href="#close-icon" />
</svg>
</div>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。