HTML三个色块怎么写?

html-css020

HTML三个色块怎么写?,第1张

<html>

<body>

<div style="background-color: orangewidth: 100%height: 20%">

</div>

<div style="background-color: greenwidth: 100%height: 60%">

</div>

<div style="background-color: bluewidth: 100%height: 20%">

</div>

</body>

</html>

<DOCTYPE HTML>

<html>

<head>

<title>一个简单的table</title>

</head>

<body>

    <table>

        <tr><td style="bgcolor:grayheight:50pxwidth:30%">灰</td>

            <td style="bgcolor:redheight:50pxwidth:30%">红</td>

            <td style="bgcolor:grayheight:50pxwidth:30%">灰</td>

        </tr>

        <tr>

        <td colspan="3"></td>

        </tr>

    </table>

</body>