欢迎来访好站网,优质网站模板提供商!

您现在的位置: 首页>>建站教程>>模块插件

html flash透明代码

来源:本站 发布时间:2023-10-25热度:1703 ℃
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Fl···

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <title>Flash透明效果</title>

    <style>

        body {

            font-family: Arial, sans-serif;

            font-size: 14px;

            margin: 0;

            padding: 0;

        }


        .container {

            display: flex;

            justify-content: center;

            align-items: center;

            height: 100vh;

        }


        .flash {

            position: relative;

            width: 300px;

            height: 200px;

            background: #000;

            opacity: 0.5;

            color: #fff;

            text-align: center;

            padding: 20px;

        }


        .flash p {

            margin: 0;

        }


        .flash:before {

            content: '';

            position: absolute;

            top: 0;

            left: 0;

            width: 100%;

            height: 100%;

            background: url(flash_image.jpg) no-repeat center center;

            background-size: cover;

            opacity: 0.5;

        }


        .flash:hover:before {

            opacity: 1;

        }

    </style>

</head>

<body>

<div class="container">

    <div class="flash">

        <h1>Flash透明效果</h1>

        <p>将鼠标悬停在Flash上面,可以看到背景图像的透明度发生变化。</p>

    </div>

</div>

</body>

</html>

上一篇:html 站内搜索代码

下一篇:没有了!