HTML透明文本,HTML / CSS文本背景透明,但文本不透明

所以我有一个问题。我环顾四周,环顾四周,但没有运气。我想使我的身体背景透明,但使文本不透明。现在,我保持相同的不透明度。这是我的代码:

@charset "utf-8";

body {

font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;

background-color: #42413C;

margin: 0;

padding: 0;

color: #000;

}

/* ~~ Element/tag selectors ~~ */

ul, ol, dl {

padding: 0;

margin: 0;

}

h1, h2, h3, h4, h5, h6, p {

margin-top: 0;

padding-right: 15px;

padding-left: 15px;

opacity:1;

}

a img {

border: none;

}

a:link {

color: #42413C;

text-decoration: underline;

}

a:visited {

color: #6E6C64;

text-decoration: underline;

}

a:hover, a:active, a:focus {

text-decoration: none;

}

.container {

width: 750px;

margin: 0 auto;

}

.content {

padding:20px;

width:710px;

position:relative;

background:#CCC;

opacity: 0.5;

}

.fltrt {

float: right;

margin-left: 8px;

}

.fltlft {

float: left;

margin-right: 8px;

}

.clearfloat {

clear:both;

height:0;

font-size: 1px;

line-height: 0px;

}

.header {

top:0%;

width: 750px;

height: 200px;

background-image: url(images/header.png);

background-repeat:no-repeat;

background-position:center;

}

.navbar {

height: 50px;

width: 750px;

position: relative;

z-index: 2;

}

#bg {

position: fixed;

top: 25%;

left: 15%;

z-index: -1;

}

div {

display: block;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值