在给body添加背景颜色的时候发现的,这个背景颜色为什么会这样

img



```html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css控制表单</title>
<style type="text/css">
    form p{padding: 0; margin: 0; border: 0;}
    body{
        background-color: skyblue;
        height: 100%;
    }
    form{
        width:420px;
        height: 200px;
        padding-top: 60px;
        margin: 250px auto;
        background:rgb(255, 255, 255,0.1);
    }
    p{
        margin-top: 15px;
        text-align: center;
    }
    p span{
        width: 60px;
        display: inline-block;
        text-align: right;
        color: salmon;
    }
    .num, .psd{
        width: 165px;
        height: 18px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        padding: 2px 2px 2px 22px;
        border-radius: 5px;
        color: rgb(21, 134, 226);
        margin-top: 15px;
    }
    .btn01{
        width: 190px;
        height: 25px;
        border-radius: 3px;
        border: 2px solid #000;
        margin-top: 60px;
        margin-left: 65px;
        background: #57b2c9;
        color: #FFF;
        border: none;
    }
</style>
</head>
<body>
    <form action="#" nethod="post">
        <p>
            <span>账号:</span>
            <input type="text" name="username" class="num" pattern="^[a-zA-Z][a-zA-Z0-9]{4,15}$" />
        </p>
        <p>
            <span>密码:</span>
            <input type="password" name="psd" class="psd" pattern="^[a-zA-Z]\w{5,17}$" />
        </p>
        <p>
            <input type="button" class="btn01" value="登录" />
        </p>
    </form>
</body>
</html>

```

背景色有什么问题吗? 你要把问题描述清楚!!

我的电脑上不会,copy的你的代码

什么浏览器啊

你的问题是不是,body的背景颜色为什么不是全部,而是form的高度是吗?如果是,你需要添加一个style样式

html {
  height:100%;
}

如果不是,请把问题描述清楚

你这不是form标签的代码颜色吗?