html外边距怎么弄?

#怎么让红色把两边填满,还有上面也不要露出来,好像是外边距和外边框的事,求教怎么弄

img

html>
<html lang="zh">
<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">
    <meta name="applicable-device" content="pc,noblie">
    <title>Nametitle>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <style>
        body { background-color:rgba(214, 214, 214, 0.445); }/*灰色背景*/
        ul li { list-style: none; }
        .topbar {
            width: ;
            height: 66px;
            background-color: red;/*纯白底white*/
        }
    style>
head>
<body>
    <div class="topbar">div>
body>
html>

使用通配符,将所有元素的margin和padding都设置为0,去掉浏览器默认的margin和padding


<!DOCTYPE html>
<html lang="zh">
<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">
    <meta name="applicable-device" content="pc,noblie">
    <title>Name</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <style>
      *{
          margin: 0;
          padding: 0;
      }
        body { background-color:rgba(214, 214, 214, 0.445); }/*灰色背景*/
        ul li { list-style: none; }
        .topbar {
            width: ;
            height: 66px;
            background-color: red;/*纯白底white*/
        }
    </style>
</head>
<body>
    <div class="topbar"></div>
</body>
</html>
 

多谢