html - 点不显示
问题描述
我希望这些点出现,稍后我想用它创建一个修复侧导航。它不再出现了。我试图解决它,但是当点出现然后消失时
.dot {
height: 0.8em;
width: 0.8em;
background-color: #fff;
border-radius: 50%;
float: right;
margin-bottom: 2em;
margin-right: 2em;
}
.sitenav {
height: auto;
width: 1em;
float: right;
position: fixed;
}
<div class="sitenav">
<a href="#start"><span class="dot" id="f"></span></a>
<a href="#two"><span class="dot" id="i"></span></a>
<a href="#three"><span class="dot" id="r"></span></a>
<a href="#four"><span class="dot" id="s"></span></a>
<a href="#five"><span class="dot" id="t"></span></a>
</div>
<div id="start">
<div class="site">
</div>
</div>
解决方案
从.sitenav
(1em 小于 5 x 2.8em,因此溢出被隐藏)中删除宽度并将颜色更改为除白色以外的任何颜色。
.dot {
height: 0.8em;
width: 0.8em;
background-color: #f00;
border-radius: 50%;
float: right;
margin-bottom: 2em;
margin-right: 2em;
}
.sitenav {
height: auto;
/*width: 1em;*/
float: right;
position: fixed;
}
<div class="sitenav">
<a href="#start"><span class="dot" id="f"></span></a>
<a href="#two"><span class="dot" id="i"></span></a>
<a href="#three"><span class="dot" id="r"></span></a>
<a href="#four"><span class="dot" id="s"></span></a>
<a href="#five"><span class="dot" id="t"></span></a>
</div>
<div id="start">
<div class="site">
</div>
</div>
推荐阅读
- python - 如何忽略 csv 文件中的空值并在 Python 中继续
- node.js - 在nodejs中的url中附加Json对象
- database - DB::table()->select()->where()->get(); 拉拉维尔
- python - 实例化重复时如何替换现有的Python线程?
- corda - Corda:TwoPartyTradeFlow 抛出异常“要求失败:”
- c# - DataTemplate 内的棱镜区域
- bash - 使用管道而不是 ; 时对 Sed 性能的影响
- python - 为 django 项目处理奇异全局变量的首选方法是什么
- python - 如何从使用 python 烧瓶构建的服务器的 http 200 响应中读取内容?
- css - 即使使用 z-index,伪元素也会与原始元素重叠