引导 |带有哈希分隔符样式的 URL
Bootstrap | URL with hash breaks styles
我正在做一个带有一些锚链接的引导项目。单击它们后,我的 css 不再起作用。
.HTML:
<a class="navbar-brand" href="#SectionID">GoToSection</a>
<div class="jumbotron">
<div class="container">
<h3 id="SectionID">Section With ID</h3>
<p>This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more »</a></p>
</div>
</div>
.CSS:
.jumbotron::before {
margin-top: -13.4505%;
top: 0;
transform: rotate(-7.73deg);
transform-origin: 100% 100% 0;
}
.jumbotron::before, .jumbotron::after {
background: white none repeat scroll 0 0;
content: " ";
display: block;
height: 0;
padding-top: 13.4505%;
position: absolute;
right: 0;
width: 100.917%;
}
*::before, *::after {
box-sizing: border-box;
}
.jumbotron::after {
top: 100%;
transform: rotate(7.73deg);
transform-origin: 100% 0 0;
}
.jumbotron {
overflow: hidden;
position: relative;
}
你可以在这把小提琴中看到它。
点击"GoToSelection"后,.jumbotron 会松开它的填充顶部。当我禁用然后启用带有火虫的属性时,它会再次醒来。
CSS 或 HTML 没有错。巨型机器人也没有失去它的填充物。这里实际发生的事情是这样的。当您单击具有href值" #SectionID"的链接" GoToSection"时,它实际上正在滚动到" <h3 id="SectionID">Section With ID</h3>
.
相关文章:
- 如何使用url加载程序在webpack中导入多个图像
- 使用php或javascript从facebook相册URL中删除多余的部分
- 当包含另一个asp文件时,是否也包含所有引用的样式和脚本页面
- Angular JS IE9 Hashbang url rewriting
- JavaScript下拉菜单-点击按钮并根据所选值重定向到url
- 菜单选项卡选择/活动样式取决于url中的file.php、javascript函数
- 缩短 URL 以保留开头和结尾(Firebug “Net” 面板样式)
- 通过javascript中的URL加载的GeoJSON多边形样式,MapBox
- 使用 PHP 中的 get url 显示 css 样式
- 在WordPress中,获取样式表中的网站URL
- 引导 |带有哈希分隔符样式的 URL
- js 从样式化的 URL 获取查询字符串
- VueJS v-bind:样式的背景图像:url()
- 在URL查询字符串中指定样式
- PHP "转到父页面"按钮上的目录样式URL
- KineticJS -使用url自定义鼠标光标样式
- 允许通配符在url的结尾为javascript条件css样式
- 仅从内联样式获取背景图像的URL
- Javascript,URL解析,条件CSS样式.在导航菜单上显示
- 如何在Angular中格式化样式标记中的URL