gpt4 book ai didi

html - 不透明度只有CSS中的div

转载 作者:太空宇宙 更新时间:2023-11-04 16:06:36 25 4
gpt4 key购买 nike

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Hello!</title>
<style type="text/css">

.class1{
border:10px solid #000000;
padding:5px;
border-radius:12px;
opacity: 0.1;
}

.class2{
border:10px solid #000000;
padding:5px;
border-radius:12px;
opacity: 100px !important;
}
</style>
</head>

<body>

<div class="class1">
nghi
<div class="class2">
nghi2
</div>

</body>

</html>

在 html 文件中。我有 2 个分区。我只想要不透明度 class1 而不是不透明度 div 2。我已经为 div2 使用了重要的属性,但它没有效果。请帮我拿下谢谢

最佳答案

opacity: 100px !important;

应该是:

opacity: 100%;

或:

opacity: 1;

此外,您还缺少结束 div 标记。您的意思是让 div 分开,还是一个在另一个里面?

关于html - 不透明度只有CSS中的div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9017902/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com