max-hou
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS3:透明度</title>
    <style type="text/css">
        div{
            width:100px;
            height:100px;
            margin: 40px;
            display: inline-block;
            background-color: #ee3e80;}
        p{
            width: 100px;
            height: 100px;
            position: relative;
            top: 20px;
            left: 20px;
            margin:20px;}
        p.one {
            background-color: rgb(0,0,0);
            opacity: 0.5;}
        p.two {
            background-color: rgb(0,0,0);
            background-color: rgba(0,0,0,0.5);}
    </style>
</head>
<body>
<div><p class="one"></p></div>
<div><p class="two"></p></div>
</body>
</html>

  

分类:

技术点:

相关文章:

  • 2021-09-17
  • 2022-12-23
  • 2021-12-26
  • 2021-11-17
  • 2021-11-27
  • 2021-06-03
猜你喜欢
  • 2021-11-27
  • 2021-11-27
  • 2021-09-04
  • 2021-12-25
  • 2021-11-17
  • 2021-11-17
  • 2021-11-27
相关资源
相似解决方案