zoukankan      html  css  js  c++  java
  • 设置div背景透明的CSS样式

    div背景透明样式:

    样式代码:

    .alert{filter:alpha(opacity=100); /* IE */ -moz-opacity:1.0; /* Moz + FF */

    opacity: 1.0; height:300px; 500px; background:#ccc; left:50%; top:50%;margin-top:-150px;margin-left:-250px;position:absolute;z-index:99; text-align:center; padding:20px;}

    使用方法:

    <div class=”alert”>

    背景透明

    </div>

    html代码:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-
    equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <style type="text/css">
    .alert
    {filter:alpha(opacity=100); /* IE */ -moz-opacity:1.0; /* Moz + FF */ opacity: 1.0; height:300px; 500px; background:#ccc; left:50%; top:50%;margin-top:-150px;margin-left:
    -250px;position:absolute;z-index:99; text-align:center; padding:20px}
    </style>
    </head>
    <body>
    <div class="alert"><a href="http://www.100sucai.com">www.100sucai.com</a></div>
    </body>
    </html>

    转载自:www.100sucai.com

  • 相关阅读:
    第八周作业
    第七周上机作业2
    神经网络基础
    [网鼎杯 2020 青龙组]AreUSerialz
    BJDCTF 2nd old-hack
    php反序列化漏洞学习
    CTFHUB-HTTP协议
    ctfhub-密码口令
    CTFHUB-信息泄漏
    buuctf-[BJDCTF 2nd]elementmaster
  • 原文地址:https://www.cnblogs.com/good10000/p/4521698.html
Copyright © 2011-2022 走看看