写一个html显示上下、左右居中的圆20px20px绿色圆上居中显示启动IE白色字号33点击后打开wwwbaiducom兼容IE11
<!DOCTYPE html>
<html>
<head>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #fff;
}
<pre><code> .circle {
width: 20px;
height: 20px;
background-color: green;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
.text {
color: white;
font-size: 33px;
}
</style>
</code></pre>
</head>
<body>
<div class="circle" onclick="openBaidu()">
<div class="text">启动IE</div>
</div>
<pre><code><script>
function openBaidu() {
window.open("http://www.baidu.com", "_blank");
}
</script>
</code></pre>
</body>
</html
原文地址: https://www.cveoy.top/t/topic/iMSI 著作权归作者所有。请勿转载和采集!