- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我无法将我的 Logo 插入页面顶部的白色横幅内。
在我的代码中你必须注意的是 header
ID:
<div id="header">
<p class="LogoFF1">FF1 Site</p>
</div>
<div class="wrapper"></div>
请引用我的JSFiddle链接:
谢谢你:)
最佳答案
只需为 Logo 类添加此 css:
.LogoFF1 {
text-align: center;
margin: 0;
}
body {
background-color: #101010;
}
header{
height:50px;
background:#F0F0F0;
border:1px solid #CCC;
width:960px;
margin:0px auto;
}
#header{
height:150px;
background:#F0F0F0;
border:1px solid #CCC;
width:960px;
margin:0px auto;
text-shadow: 6px 5px 4px #FF0000;
font-size:130px;
position: relative;
}
h2.main {
font-size: 20px;
letter-spacing:1px;
text-align: center;
text-shadow: 0px 0px 2px #2050FF,
-2px -2px 2px #2050FF,
2px -2px 2px #2050FF,
-2px 2px 2px #2050FF,
2px 2px 2px #2050FF;"
}
#section {
max-width: 960px;
color: #FFFFFF;
padding:4px;
margin-top: auto;
margin-bottom: auto;
margin-right: auto;
margin-left: auto;
padding-left: 220px;
text-align: center;
letter-spacing: 1px;
}
#section2 {
max-width: 1000px;
color: #FFFFFF;
padding:4px;
margin-top: auto;
margin-bottom: auto;
margin-right: auto;
margin-left: auto;
padding-left: 220px;
text-align: center;
letter-spacing: 1px;
}
.main-header {
text-align: center;
padding: 5px;
padding-left: 300px;
height: 160px;
margin: left;
}
IMG.displayed {
display: block;
margin-left: auto;
margin-right: auto;
float: left;
}
h1 {
color: #ffffff;
}
div.wrapper {
margin: 10px left;
width: 250px;
float: left;
}
nav.vertical {
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, .15);
overflow: hidden;
text-align: center;
}
nav.vertical > ul {
padding: 0;
}
nav.vertical > ul > li {
display: block;
}
nav.vertical > ul > li > label,
nav.vertical > ul > li > a {
background: rgb(181,189,200); /* Old browsers */
background: -moz-linear-gradient(top, rgb(181,189,200) 0%, rgb(130,140,149) 36%, rgb(40,52,59) 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(top, rgb(181,189,200) 0%,rgb(130,140,149) 36%,rgb(40,52,59) 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, rgb(181,189,200) 0%,rgb(130,140,149) 36%,rgb(40,52,59) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
border-bottom: 1px solid rgba(255, 255, 255, .1);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .1), 0 1px 1px rgba(0, 0, 0, .1);
color: rgb(255, 255, 255);
display: block;
font-size: .85rem;
font-weight: 500;
height: 50px;
line-height: 50px;
text-shadow: 0 1px 1px rgba(0, 0, 0, .1);
text-transform: uppercase;
transition: all .1s ease;
text-decoration: none;
}
nav.vertical > ul > li > label:hover,
nav.vertical > ul > li > a:hover {
background-color: rgb(114, 51, 98);
background-image: -webkit-linear-gradient(150deg, rgb(114, 51, 98), rgb(114, 51, 98));
background-image: -moz-linear-gradient(150deg, rgb(114, 51, 98), rgb(114, 51, 98));
background-image: -o-linear-gradient(150deg, rgb(114, 51, 98), rgb(114, 51, 98));
background-image: linear-gradient(150deg, rgb(114, 51, 98), rgb(114, 51, 98));
cursor: pointer;
}
nav.vertical > ul > li > label + input {
display: none;
visability: hidden;
}
/* unvisited link */
a:link {
color: #AAAAFF;
}
/* visited link */
a:visited {
color: #DD04FF;
}
/* mouse over link */
a:hover {
color: #FF0000;
}
/* selected link */
a:active {
color: #FFCC00;
}
footer {
color: #ffffff;
}
nav {
background-color: dimgrey;
border: 5px solid #333;
}
nav ul {
nav ul: list-style-type: none;
}
nav li {
padding: 2px;
display: inline-block;
border-right: 1px solid #fff;
}
nav li a:link {
text-decoration: none: font-weight: 700;
text-transform: uppercase;
color: #fff;
font-family: sans-serif;
font-size: 0.9em;
}
nav li:hover {
background-color: teal;
}
.LogoFF1 {
text-align: center;
margin: 0;
}
<!DOCTYPE html>
<html>
<head>
<title>About</title>
<link rel="stylesheet" type="text/css" href="css/home.css">
<meta charset="UTF-8">
</head>
<body>
<main>
<div id="header">
<p class="LogoFF1">FF1 Site</p>
</div>
<div class="wrapper">
<nav class="vertical">
<ul>
<li>
<a href="homePage.html">Home</a>
</li>
<li>
<a href="profile.html">Profile</a>
</li>
<li>
<a href="personalBests.html">Personal Bests</a>
</li>
<li>
<a href="links.html">Links</a>
</li>
<li>
<a href="about.html">About</a>
</li>
</ul>
</nav>
</div>
<div id="section">
<article>
<h2>About</h2>
<p>
Hello there, and welcome to FireFalcons personal website!
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent pharetra rutrum massa vitae cursus.
Integer condimentum sollicitudin tristique. Ut lectus mi, iaculis eget faucibus quis, tincidunt eu ligula.
Aliquam id ornare dui. Nulla efficitur ipsum vitae magna ultricies placerat ullamcorper ut turpis.
Ut sed malesuada nibh. Phasellus fringilla ex a eros volutpat consectetur.
</p>
</article>
</div>
<hr>
<footer>
<strong>
Copyright © 2016 Stephen Fawcett, All rights reserved
</strong>
</footer>
</main>
</body>
</html>
关于html - 如何将我的 Logo 插入横幅并居中对齐?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39695626/
谁能看看这个 fiddle http://jsfiddle.net/pkcwtone/1/并告诉我为什么我无法将图像完全放入导航中? 这是 html:
到目前为止,我有 9 个 Logo ,并且我按列表顺序显示该 Logo 。现在我要做的是,我必须显示前 3 个 Logo 并等待几秒钟,然后隐藏该 3 个 Logo 并再次显示接下来的 3 个 Log
我正在尝试 ACSLogo(Mac 版本的 Logo)中的递归程序,并希望返回 2 个整数的列表(基本上是 X 坐标和 Y 坐标)。我不知道如何让它返回 2 个值。它没有问题。 此外,当您创建一个列表
我有一个用户以 PNG 格式上传的 Logo 。 我的目标是将用户上传的 Logo 转换为白色。 像这样 - 这样它在较暗的背景下看起来不错。 我可以导出它并使用 Photoshop 获得我想要的东西
经过多次研究后,我没有弄清楚如何将我的 Web 应用程序的 Logo 与导航项对齐。我创建了 Logo 图像,但无法以正确的方式对齐它!希望你们中的一些人能帮助我。 这是Haml代码 %heade
我在 Joomla 2.5 的模板上使用 Gantry 该模板在第一点设置为托管一个小图像作为 Logo ,但我希望它在宽度方面更改为更大的图像。 因此,现在它在 ipad 上不起作用,因为它开箱即用
我正在工作的站点的 Logo 出现在左侧,但我希望它居中。我该怎么办?在下方找到 CSS 代码。 header .logo{ display: inline-block; padding: 0; ve
我确信这使用 jquery 相当简单,但我无法弄明白。我有一个带有 Logo 的网站,该网站加载时会出现。当用户将鼠标悬停在某个导航链接上时,我想将该 Logo 与不同的 Logo 交换。 当鼠标悬停
我想知道使用 LOGO 是否有任何真正的缺点?我知道它是用来教 child 的,但理论上它可以用于更高级别的项目。除了它的许多不同版本之外,还有什么真正的缺点吗? 最佳答案 除了实际问题(跨平台支持、
我一直在尝试使用公司文档中发布的两种简单方法替换 JASPERSOFT CE 中的 Logo 和背景图像。我面临的问题是它从 MYSQL 数据库加载 _THEMES\5A5D753\IMAGES\LO
当用户将鼠标悬停在导航栏上时,我试图让我的 Logo 从透明背景变为填充背景。 目前,我的 JQuery 在悬停时工作,但当用户离开导航时, Logo 不会变回透明 Logo 。
我知道之前已经回答过类似的问题。但我无法弄清楚哪种方法是最好的。我发现有两种方法: 使用img 标签获取两张图片,一张是小尺寸的,一张是大尺寸的。在大屏幕上隐藏小尺寸 Logo ,在小尺寸屏幕上则相反
我在页眉中使用的 Logo 没有背景,但我在 Logo 悬停时添加了背景。我希望 Logo 背景放大,但我使用的代码使 Logo 放大而不是背景......如何更改代码以在不影响 Logo 的情况下放
我试图将 Logo 与其下方的相应文本水平对齐,以便它们看起来美观且有序。目前,它们只是垂直的。我搜索了这个网站和许多其他网站,并尝试了不同的解决方案,但似乎没有任何效果。这是我的代码。 .intro
我正在尝试调整 Logo 的大小,并在不调整导航栏大小的情况下将标题添加到 Logo 的一侧。 What the current navbar looks like HTML:
Toggle navigation
在我的网站上,我有一个 Logo 图像,然后是公司名称。目前它是堆叠的,所以它是 Logo 图像,下面是公司名称。 我想要的是他们肩并肩。因此,左侧是 Logo 图像,右侧是公司名称。 我做错了什么?
我读过 标签 is inappropriate for a logo .但是,如果您的 Logo 是纯文本,您应该使用什么?我觉得 和 也不合适。这是一个示例: Comp
Berkeley Logo User Manual 告诉我们,所有在连字符后的命令行参数都将收集在变量中: If a command line argument is just a hyphen, t
我试图将 Logo 与几个导航链接对齐,其中大多数网站的 Logo 在左侧,几个链接在右侧(这是我正在努力实现的目标)。 我有一个媒体查询,使标题 Logo 显示在导航链接上方。 但是好像不行。 我确
我是一名优秀的程序员,十分优秀!