<!DOCTYPE html>
<html>
<head>科学上网图标</title>
<style>
.scientific-icon {
padding: 2px;
font-family: Arial, sans-serif;
font-size: 24px;
margin: 1px 0;
background-color: #fff;
border-radius: 5px;
cursor: pointer;
}
.scientific-icon:hover {
background-color: #eee;
}
.scientific-icon:active {
background-color: #ddd;
}
/* 添加动态更新功能 */
.update-icon {
margin: 1px 0;
}
.update-icon::before {
content: '√';
position: absolute;
top: 5%;
left: 5%;
width: 2px;
height: 2px;
background-color: #4CAF5;
transform: rotate(45deg);
transition: background-color 0.3s;
}
</style>
</head>
<body>
<div class="scientific-icon" id="my-icon">
<i class="bi bi-science"></i>
</div>
</body>
</html>
这个示例展示了一个带有“科学”或“计算器”的图标,并且带有动态更新功能(√符号),你可以根据需要修改 icon 的内容和样式。
如果需要支持网络版的科学上网图标,请参考以下示例:
<!DOCTYPE html>
<html>
<head>科学上网图标(网络版)</title>
<style>
.network-icon {
padding: 2px;
font-family: Arial, sans-serif;
font-size: 24px;
margin: 1px 0;
background-color: #fff;
border-radius: 5px;
cursor: pointer;
}
.network-icon:hover {
background-color: #eee;
}
.network-icon:active {
background-color: #ddd;
}
/* 添加动态更新功能 */
.update-icon {
margin: 1px 0;
}
.update-icon::before {
content: '√';
position: absolute;
top: 5%;
left: 5%;
width: 2px;
height: 2px;
background-color: #4CAF5;
transform: rotate(45deg);
transition: background-color 0.3s;
}
</style>
</head>
<body>
<div class="network-icon" id="my-icon">
<i class="bi bi-science"></i>
</div>
</body>
</html>
这个示例展示了一个带有“网络版科学”或“科学”图标的网络版本,你可以根据需要修改 icon 的内容和样式。
如果需要动态更新的功能,建议你添加 JavaScript 来实现。
<script>
// 在网页末尾添加动态更新按钮
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.8.5/dist/umd/popper.min.js"></script>
<script>
// 可选功能:动态更新图标
const updateIcon = () => {
document.getElementById('my-icon').innerHTML = '√';
};
// 统一更新
updateIcon();
// 每隔 X 秒更新一次
setInterval(updateIcon, 1);
</script>
</body>
</html>
这个代码可以在网页末尾添加一个动态更新图标的功能,每 1 秒更新一次。
