- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我一直致力于开发一个简单的网站,以提高我在 HTML 和 CSS 方面的技能。我一直遇到一个问题,我似乎无法让类中的某些元素进入页面顶部的栏。
这是 html 的片段。
<body>
<!-- A logo will go here but here is some text for now -->
<h1 ID="Logo">Website</h1>
<img Class="Social" src="assets/facebook.png"/>
<img Class="Social" src="assets/twitter.png"/>
<img Class="Social" src="assets/instagram.png"/>
<img Class="Social" src="assets/snapchat.png"/>
<!-- The menu bar -->
<ul class="menu" ID="Menu_Bar">
<li Class="Menu_Item" ID="Home">
<a Class="Menu_Link" href="index.html">Home</a>
</li>
<li Class="Menu_Item" ID="About_Us">
<a Class="Menu_Link" href="about.html">About Us</a>
</li>
<li Class="Menu_Item" ID="Events">
<a Class="Menu_Link" href="events.html">Events</a>
</li>
<li Class="Menu_Item" ID="Contact">
<a Class="Menu_Link" href="contact.html">Contact Us</a>
</li>
</ul>
<!-- An image-->
<img ID="theGang" src="https://static.pexels.com/photos/126407/pexels-photo-126407.jpeg"/>
</body>
ID Logo 使顶栏横跨整个屏幕顶部,我似乎无法让“社交”类中的元素进入该顶栏。他们似乎就坐在它的正下方。
这是CSS。
/* allows elements to use the full lengths of the webpage */
* {
margin: 0px;
border: 0px;
padding: 0px;
}
body {
margin: 0px;
padding: 0px;
}
/* this is the formatting for the logo */
#Logo{
font-family: 'Germania One', cursive;
font-size: 80px;
color: #2E2F44;
background-color: #DE1B2B;
}
.Social {
float: right;
}
/*
*=== Formats the menu bar for the webpage
*===Begin===*
*/
.menu{
position: fixed;
width: 100%;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #2E2F44;
font-family: 'Germania One', cursive;
font-size: 20px;
}
.Menu_Item{
float: left;
}
.Menu_Item .Menu_Link {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
.Menu_Item .Menu_Link:hover {
background-color: #DE1B2B;
}
/*
*===End===*
*/
/* Formats the header image, 'z-index' makes the image fall behind the nav bar */
#theGang{
position: absolute;
max-width: 100%;
height: auto;
display: none;
z-index: -1;
}
最佳答案
如果您将 display: inline-block
添加到 #Logo
css 规则,这将使 #Logo
保持在左侧,而 .Social
元素,这是您要查找的内容,还是要保留红色条和“网站”一词旁边的 .Social
元素?
关于HTML 元素未进入顶栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46628767/
php应用越来越多,也越来越广泛,为了增加网站的丰富多彩,从而出现了很多新的技术。ajax是现代网站中不能缺少的一项技术,他可以异步刷新数据,而实现很多效果,比如刷新验证码,微博中的赞功能,都是运用
我想在用户将tableView滚动到顶部时进行分页,因为我已经使用了这种UIScrollView方法。但是它将多次调用api 最佳答案 不好意思 当服务器提供数据计数数量 -(void)tableVi
我有以下 swift 代码,我想要实现的是从顶部滑出的 segue。我希望第二个 VCView 位于第一个 VCView 下方,并且让第一个 VCView 滑出显示第二个 VCView。 目前没有动画
我正在使用 ECSliding我有这个问题! 在我的项目中有这个文件: InitViewController (ECSlidingController) FirstViewController (UI
当我们浏览网页时,我们想对网页内容如文章、评论中的观点持赞同或反对意见时,可以通过点击网页中的“顶”和“踩”来进行投票。而整个交互过程,开发者可以通过ajax异步来实现,从而提高用户体验
您好,我遇到了这样的问题, 我有两个 View ,例如我的第一个 View 是 A,其图像如下所示 我正在这个 View A 上打开 View B 例如,当我触摸没有按钮的区域时,在 View B 中
我正在尝试从图像生成鸟瞰图。对于相机固有特性和畸变,我使用的是从驾驶模拟器中检索到的硬编码值,该驾驶模拟器的车顶上安装了相机。 代码的基础来自“使用 OpenCV 库学习 OpenCV 计算机视觉”,
我正在尝试使用 Linux perf 进行一些性能分析。我有一个构建时去掉了符号的应用程序,令我惊讶的是 Linux perf top 无法显示 disassmbly 行。它只显示原始 EIP。 我们
本文实例为大家分享了基于PHP+jQuery+MySql实现红蓝(顶踩)投票代码,供大家参考,具体内容如下 数据库操作: ?
我正在使用 VueJS 和 Bootstrap 开发应用程序。我试图将一个 div 与图像居中,同时让复选框标 checkout 现在右上角,如下所示。 但是当鼠标悬停在卡片上时,图像会稍微向左移动,
我是一名优秀的程序员,十分优秀!