html - 浮动 css 问题与其他部分重叠
问题描述
每当我使用 css 中的浮点数运行此程序时,应该保持在浮点数部分下方的其他部分与浮点数部分重叠。我应该怎么做才能解决这个问题?
header {
background: yellow;
border-width: 5px;
border-color: brown;
border-style: double;
border-radius: 10px;
box-shadow: aquamarine 5px 5px 10px, aquamarine -5px -5px 10px;
text-align: center;
text-transform: uppercase;
text-shadow: rgb(86, 235, 86) 5px 5px 5px, rgb(86, 235, 86) -5px -5px 5px;
}
header h2,
h3,
h4,
h5,
h6 {
display: none;
}
div.Float {
background: red;
}
.Font_tags {
width: 50%;
background: sienna;
border-width: 3px;
border-style: solid;
border-color: blueviolet;
margin-top: 25px;
padding: 5px;
float: left;
}
.image_links {
border-width: 5px;
border-color: blue;
border-style: dotted;
margin-top: 25px;
padding: 5px;
width: 40%;
float: right;
text-align: center;
}
img,
video,
audio {
width: 400px;
}
footer {
text-align: center;
clear: both;
position: relative;
height: 200px;
margin-top: -200px;
}
.form {
border: 5px solid rebeccapurple;
}
<header>
<h1 class="heading1">heading 1</h1>
<h2 class="heading2">heading 2</h2>
<h3 class="heading3">heading 3</h3>
<h4 class="heading4">heading 4</h4>
<h5 class="heading5">heading 5</h5>
<h6 class="heading6">heading 6</h6>
</header>
<div class="Float">
<section class="Font_tags">
<h3>Lorem ipsum dolor sit amet.</h3>
<p>
<u>Underline</u> <b>Bold</b> <i>Italic</i> <strong>Strong</strong> <small>Small</small> <br> The old price is <del>$250</del> & the new price is <ins>$200</ins> <br> (a+b)
<sup>2</sup>=a<sup>2</sup>+2ab+b<sup>2</sup><br> Water= H<sub>2</sub>O <br>
<q>This is a quote</q> <br>
<blockquote>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae, quibusdam!
</blockquote>
</p>
</section>
<section class="image_links">
<img src="picture.jpg" alt="image">
<figcaption>This is a image</figcaption>
<hr>
<video src="PUBG MOBILE_2020-05-20-11-23-49.mp4" controls autoplay muted></video>
<hr>
<audio src="music1.mp3" controls autoplay muted></audio>
</section>
</div>
<div class="table-form">
<section class="form_table">
<div class="form">
<form method="GET" action="">
<input type="text" placeholder="Text"><br>
<input type="password" placeholder="password"><br>
<input type="email" placeholder="email"><br>
<input type="week"><br>
<input type="file"><br>
<input type="submit" value="Log in">
<input type="checkbox">One<br>
<input type="checkbox">Two<br>
<input type="checkbox">Three<br>
<input type="checkbox">Four<br>
</form>
</div>
</section>
</div>
<footer>
<p>Copyright merin @2020</p>
</footer>
解决方案
推荐阅读
- javascript - 如何在 javascript 中使用 jest 测试 Web 组件中的插槽元素(无框架)
- java - 如何使用@Transactional 确保对Springboot 中的数据进行顺序访问?
- python - python groupby to dataframe(只是groupby to data,没有其他功能)导出到excel
- testing - 仅针对选定类的 VOC 样式数据集的 mmdetection 测试结果
- javascript - React - 如何通过 axios 调用从 JS 文件中导出数组并在另一个 JS 文件中使用它?
- ios - “无法加载 public.video 类型的表示”使用 PHPickerViewController
- raspberry-pi - 网络 UPS 工具脚本协助
- oracle - 获取 Oracle 表 ddl 但没有来自当前模式的额外详细信息的问题
- python - 使用 numpy 逐行查找唯一值的计数
- python - 如何在反应 webapp 中使用带有 TFIdVectorizer 的模型