一、代码如下:
<!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>百度首页布局</title>
</head>
<style>
* {
padding: 0;
}
header,main {
width: 100vw;
}
header {
height: 100px;
background-color: yellowgreen;
opacity: 1;
position: fixed;