星空网 > 软件开发 > 网页设计

设置div背景透明的CSS样式

div背景透明样式:

样式代码:

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

opacity: 1.0; height:300px; width: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 <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; width: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 ><a href="http://www.100sucai.com">www.100sucai.com</a></div>
</body>
</html>

转载自:www.100sucai.com




原标题:设置div背景透明的CSS样式

关键词:CSS

CSS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

新手要开始进军亚马逊了吗?6个基本步骤不要忘!:https://www.ikjzd.com/articles/97557
外贸人必备的各国进口关税查询网站大全:https://www.ikjzd.com/articles/97558
法国将禁止销毁未售出商品,滞销库存如何处理?:https://www.ikjzd.com/articles/97559
亚马逊德国站500多卖家产品被下架 / 中日签署双边本币互换协议:https://www.ikjzd.com/articles/9756
PPC广告怎样才能有效果?:https://www.ikjzd.com/articles/97560
降低PPC有什么好方法?:https://www.ikjzd.com/articles/97562
价格翻了8倍,居然还有人买,秘诀在这里。:https://www.kjdsnews.com/a/1836642.html
欧洲B2B电商市场有待挖掘!销售总额将达1.7万亿欧元:https://www.kjdsnews.com/a/1836643.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流