body margin&padding = 0;
div离开视口
<div id="banner" style="
height: 800px;
width: 100%;
transform: rotate(165deg);
background-color: #f00;
position: absolute;
top: -400px;
left: -50px;
"></div>
答案 0 :(得分:0)
将其包裹在另一个div中并设置溢出隐藏
body{margin:0}
<div style="position: relative; width: 100%; height: 300px; overflow: hidden; ">
<div id="banner" style="
height: 500px;
width: 200%;
transform: rotate(165deg);
background-color: #f00;
position: absolute;
top: -400px;
left: -100px;
"></div>
</div>