zoukankan      html  css  js  c++  java
  • CSS让div背景透明

    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>100素材网</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">100素材网</div>
    </body>
    </html>
  • 相关阅读:
    2016年第七届蓝桥杯C/C++ A组国赛 —— 第一题:随意组合
    寻找段落
    攻击火星
    图论入门
    实数加法
    求 10000 以内 n 的阶乘
    大整数因子
    计算2的N次方
    大整数减法
    大整数加法
  • 原文地址:https://www.cnblogs.com/good10000/p/5943061.html
Copyright © 2011-2022 走看看