<!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;
    }
&lt;/style&gt;
</code></pre>
</head>
<body>
    <div class="circle" onclick="openBaidu()">
        <div class="text">启动IE</div>
    </div>
<pre><code>&lt;script&gt;
    function openBaidu() {
        window.open(&quot;http://www.baidu.com&quot;, &quot;_blank&quot;);
    }
&lt;/script&gt;
</code></pre>
</body>
</html
写一个html显示上下、左右居中的圆20px20px绿色圆上居中显示启动IE白色字号33点击后打开wwwbaiducom兼容IE11

原文地址: https://www.cveoy.top/t/topic/iMSI 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录