happyleo12
2016-11-01 01:55
采纳率: 50%
浏览 946
已采纳

div+css图片透明,文字不透明

想要的效果是:div的background是url(img)且图片透明,且撑满全屏,无论窗口大小
div内有个表格且文字不透明

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <link href="./style/style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        body {
            margin: 0;
            overflow: auto;
        }

        #demo {
            background: url(img/backpic.png);
            background-color: rgba(0,0,0,0.1);
        }

        li {
            font-size: 20px;
            font-family: Arial;
            text-decoration: none;
        }

        .ul {
            margin: 0;
            padding: 0;
            padding-left: 17px;
        }

        a {
            text-decoration: none;
            font-family: Tahoma, Arial;
            font-size: 15px;
            color: Blue;
        }

        td {
            vertical-align: text-top;
            line-height: 18px;
        }

        table {
            margin: auto;
            width: 70%;
        }

        a:hover {
            color: red;
        }
    </style>
</head>
<body>
    <div id="demo">
        <table>
            <tr>
                <td>
                    <br />
                    <br />
                    <br />
                    <b>System</b>
                    <ul class="ul">
                        <li><a href="./MRTS.html" target="_blank">MRTS</a></li>
                    </ul>
                    <br />
                </td>
            </tr>
        </table>
    </div>
</body>
</html>

2条回答 默认 最新

相关推荐 更多相似问题