100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > html背景透明图片不透明 html - css实现背景透明内容不透明。

html背景透明图片不透明 html - css实现背景透明内容不透明。

时间:2023-12-03 20:04:28

相关推荐

html背景透明图片不透明 html - css实现背景透明内容不透明。

阿神-04-17 12:09:427楼

谢谢大家的建议,由于我接触前端开发很浅,浏览器兼容的问题还不是很懂,目前还没怎么考虑。

再加上我是想把背景设置为图片,也不打算用处理过的半透明图片,所以最终写成了这样:

.back{

position: absolute;

width: 1500px;

height: 1500px;

margin-left: 0px;

margin-right: 0px;

background: url(images/back.png);

background-attachment: fixed;

background-repeat: no-repeat;

opacity: 0.35;

z-index: 0;

}

.col-lg-10#content{

height: 1500px;

margin-left: 5px;

margin-right: 5%;

margin-top: 0px;

background: rgba(255,255,255,0.8);

z-index: 1;

}

.container{

height: 1500px;

margin-left: 0px;

}

.container-back{

margin-left: 5px;

margin-right: 5px;

}

{% block content %}

{% endblock %}

有什么问题还请大家指教。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。