跳转到内容

HTML 如何创建简单亚克力效果 ​

很简单,在你的页面中添加如下亚克力效果样式。

css
.container {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

然后在你需要使用的地方添加 class="container" 即可。

例如:

html
<div class="container">
    <h1>欢迎来到xxx页面!</h1>
    <p><del>什么?这是什么?</del></p>
    <div class="container">
        <p>啊吧啊吧...</p>
    </div>
</div>

渲染效果如下:

渲染效果