- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我一直在尝试让文字所在的框亮起来,而不是我网站导航栏上的实际文字,My site .
如果您能告诉我在哪里以及如何编辑代码以获得预期的结果,那将非常有帮助。
注意:请记住,我是一名网页设计新手。
这是代码layout.css代码和index.html代码:layout.css
body {
margin: 0px;
height: 100%;
background-image: url(../img/bg_main.png);
}
@font-face {
font-family: Logo;
src: url(font/minecraft_font_by_pwnage_block-d37t6nb.ttf);
}
#header {
background:#8cbeff;
background-image: url(../img/180px-Sun.png), url(../img/bg-outside-clouds.png);
background-position: center right, top;
background-repeat: no-repeat;
width: 100%;
padding: 20px 0;
margin:0;
overflow: hidden;
}
#logo {
margin: 0px auto;
margin-bottom: -50px;
width: 990px;
font-size: 30px;
}
#logo h1 {
color: #222;
text-shadow:0 0 30px #333;
}
#logo h1:before {
content:"Maven"; /* Yellow Text */
color: yellow;
font-family: Logo;
}
#logo h1:after {
content: "PVP"; /* Black Text */
font-family: Logo;
}
#nav {
margin-top: -20px;
margin-bottom: -5px;
background-color:#2b2b2b;
border-bottom:4px solid #444442;
font-size:15px;
height:36px;
-webkit-box-shadow:0 0 5px #666;
-moz-box-shadow: 0 0 5px #666;
box-shadow:0 0 5px #666;
border-top: 10px solid #009514;
position: relative;
z-index: 9999;
}
#nav_holder {
width: 1000px;
margin: 0px auto;
margin-top: -15px;
}
#nav_holder ul.right {
float: right;
margin-top: 0px;
margin-right: 10px;
}
#nav_holder li.first {
margin-left: -30px;
border-left: 1px solid #333;
box-shadow: 1px 0 #000 inset, -1px 0 #000 inset;
-moz-box-shadow: 1px 0 #000 inset, -1px 0 #000 inset;
-webkit-box-shadow: 1px 0 #000 inset, -1px 0 #000 inset;
text-shadow:0 0 1px #000;
}
#nav_holder li {
list-style: none;
float: left;
border-right: 1px solid #333;
box-shadow: -1px 0 #000 inset;
-moz-box-shadow: -1px 0 #000 inset;
-webkit-box-shadow: -1px 0 #000 inset;
text-shadow:0 0 1px #000;
}
#nav_holder li a {
line-height: 36px;
text-decoration: none;
color: #FFF;
opacity: 0.9;
margin-right: 20px;
margin-left: 20px;
transition: color .2s linear;
-webkit-transition: color .2s linear;
-moz-transition: color .2s linear;
font-size: 12px;
color: yellow;
font-family: Logo;
}
#nav_holder li a:hover {
opacity: 0.5;
color: #00a5f0;
transition: color .2s linear;
-webkit-transition: color .1s linear;
-moz-transition: grow .1s linear;
}
#nav_holder li a:active {
opacity: 1;
color: #000;
width: 300px;
}
/* Now the header is done */
/* Main Content */
.sub_header {
width: 960px;
min-height: 105px;
margin: 0px auto;
padding: 10px;
background: url(../img/planks.jpg);
border: 4px solid #56472A;
-moz-box-shadow: -2px 2px 3px #333;
-webkit-box-shadow: -2px -2px 3px #333;
box-shadow: -2px -2px 3px #333;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
font-size: 14px;
z-index: 9;
position: relative;
}
.announcement {
background: #7f9db9;
margin: 0px auto;
height: 50px;
width: 1020px;
position: relative;
left: -29px;
top: 20px;
float: left;
-moz-box-shadow: 0px 0px 4px rgba(0,0,0,0.55);
-khtml-box-shadow: 0px 0px 4px rgba(0,0,0,0.55);
-webkit-box-shadow: 0px 0px 4px rgba(0,0,0,0.55);
z-index: 100;
}
.announcement ul#items {
list-style: none;
margin-top: 8px;
color: #fff;
font-size: 30px;
text-align: center;
text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.triangle-l {
border-color: transparent #7d90a3 transparent transparent;
border-style:solid;
border-width:15px;
height:0px;
width:0px;
position: relative;
left: -44px;
top: 55px;
z-index: -1;
}
.triangle-r {
border-color: transparent transparent transparent #7d90a3;
border-style:solid;
border-width:15px;
height:0px;
width:0px;
position: relative;
left: 974px;
top: 27px;
z-index: -1;
}
#content_container {
width: 950px;
margin: 0px auto;
margin-top: 10px;
}
.sidebar {
margin-bottom: 10px;
-webkit-border-radius: 5px;
-moz-border-radius: 10px;
border-radius: 10px;
border-top: 2px inset black;
border-bottom: 2px outset black;
background-image:url(../img/sidebar.png);
width: 249px;
float: left;
}
.sidebar h1,h2,h3,h4,h5,h6,p{
padding-left: 20px;
font-family: 'Sanchez', serif;
}
.sidebar h3.address {
margin-bottom: -10px;
}
.sidebar div.online {
float: right;
margin-right: 40px;
margin-top: -36px;;
width: 15px;
height: 15px;
border-radius: 50px;
background-color: green;
box-shadow: 0px 0px 2px 2px green;
}
.sidebar div.offline {
float: right;
margin-right: 40px;
margin-top: -36px;;
width: 15px;
height: 15px;
border-radius: 50px;
background-color: red;
box-shadow: 0px 0px 2px 2px red;
}
.sidebar p.address {
color: green;
}
.right_content {
background-image:url(../img/right_content.png);
float: right;
margin-top: 3px;
margin-bottom: 30px;
min-height: 200px;
border: 4px solid #222;
border-radius: 3px;
-webkit-box-shadow: 0px 0px 10px rgba(000, 0, 0, 1);
-moz-box-shadow: 0px 0px 10px rgba(000, 0, 0, 1);
box-shadow: 0px 0px 10px rgba(000, 0, 0, 1);
width: 660px;
color: #999;
}
.right_content h1,h2,h3,h4,h5,h6,p {
padding-left: 30px;
margin-right: 30px;
}
.right_content h1 {
color: #999;
text-shadow: 1px 1px 1px #000;
width: 300px;
margin-top: 0px;
background-color: #222;
-webkit-border-bottom-right-radius: 10px;
-moz-border-radius-bottomright: 10px;
border-bottom-right-radius: 10px;
}
.footer {
text-align: Center;
font-size: x-small;
}
index.html
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<!-- Site Title -->
<title>Minecraft</title>
<!-- Styles -->
<link rel="stylesheet" href="style/layout.css">
<link href='http://fonts.googleapis.com/css?family=Sanchez' rel='stylesheet' type='text/css'> <!-- Google Font (Replace with own if needed) -->
<!-- Javascript -->
<script src="js/jquery00.js"></script>
<script src="js/ticker00.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#items').list_ticker({
speed:5000,
effect:'fade'
});
})
</script>
</head>
<body>
<!-- Site Header -->
<div id="header">
<div id="logo">
<h1></h1> <!-- Site's Title on line 36 and 42 in layout.css -->
</div>
</div>
<!-- Navigation Bar -->
<div id="nav">
<div id="nav_holder">
<ul>
<li class="first"><a href="#"> Home </a> </li>
<li><a href="rules.html"> Rules </a> </li>
<li><a href="#"> Help </a> </li>
<li><a href="#"> Forum </a> </li>
</ul>
<ul class="right">
<li class="first"><a href="#"> Sign Up! </a> </li>
</ul>
</div>
</div>
<!-- Main Content -->
<div class="sub_header">
<!-- Announcements Ribbon -->
<div class="announcement">
<ul id="items">
<!-- Replace these with your messages -->
<li>Server's site was made by sgt_awes0me</li>
<li>Sign up on the forums now!</li>
<li>Here is another one. This one is a little bit longer</li>
<li>Server's Ip is 555.5555.5555:55555</li>
</ul>
</div>
<!-- Creates the ribbon feel -->
<div class="triangle-l"></div>
<div class="triangle-r"></div>
</div>
<!-- End of Header and Sub-Header -->
<!--
====================================
Now The Main Content Begins
====================================
-->
<!-- Content Container -->
<div id="content_container">
<!-- Right Content -->
<div class="right_content">
<h1> Welcome! </h1> <!-- Title -->
<!-- This is dummy text. You can change it to whatever you like -->
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi lacinia lorem blandit erat bibendum pharetra. In odio sapien, sodales in tempus nec, feugiat a ante. Sed tincidunt vestibulum lacus at posuere. Nulla metus justo, pretium in tempor a, condimentum non metus. Suspendisse enim velit, rhoncus eu vehicula ut, molestie non neque. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rutrum, lacus ut condimentum dapibus, leo enim faucibus lectus, a dictum lacus ipsum non nulla. Maecenas tempus magna quis nunc aliquam sit amet venenatis felis vulputate. Fusce vel nisl odio, eget suscipit tellus.
Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam hendrerit sagittis posuere. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla facilisi. Sed imperdiet enim in diam venenatis vel faucibus velit vestibulum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse mauris quam, porta molestie volutpat et, consectetur eu nisi. Etiam at risus massa, non accumsan tortor. Sed tortor ligula, rhoncus eget fermentum ut, tincidunt eu tortor. Quisque urna lectus, posuere iaculis tempor id, lobortis sed dui. Vivamus ultricies luctus eros non molestie. Nunc vitae erat lectus. Proin elit lectus, cursus et cursus ac, posuere porta felis. Ut vitae felis et ipsum vulputate convallis. Proin tincidunt orci a dolor congue ut tempor quam egestas.</p>
<div class="footer">
<p>Copyright © 2012 - Server Name
</div>
</div>
<!-- Sidebar. You can either have one long sidebar or multiple "widgets" -->
<div class="sidebar">
<h3 class="address">Server Address</h3>
<p class="address">555.5555.555:25565</p>
</div>
<div class="sidebar">
<!-- Change To Online or Offline depending on your server status -->
<h3>Server Status: </h3> <div class="offline"></div>
</div>
<div class="sidebar">
<h3> Example Header </h3>
<p>This is where you can put a server description or anything else!</p>
<h3>
</h3>
</div>
</div>
</body>
</html>
最佳答案
这是您要找的吗?
#nav_holder li:hover { background: white; }
关于html - 如何使导航栏中的框亮起 - CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24923195/
在这个 fiddle 上,函数完美地完成了工作,但我需要稍微调整连接。 该点击甚至需要是父 div 的 addClass(深色/浅色)(true 或 false)。 如果是深色,则添加 Bright
我正在使用 Windows.UI.ViewManagement.UISettings 来获取系统强调色,但该类似乎没有任何亮/暗模式的方法或属性。我找不到此功能的文档,我该如何检测? PS:我正在制作
在使用 iOS 13 在明暗模式之间切换时,我遇到了显示键盘的异常行为。 该 View 有一个 inputAccessoryView 供用户输入消息。当然后在键盘显示的情况下切换亮/暗模式时,亮/暗模
我正在开发一个支持多个主题的 iOS 应用程序。有些主题使用深色背景,有些使用浅色。一些默认图标在深色/浅色背景中不可见。我在 xcassets 中看到一个选项,可以为不同的颜色模式添加图像。我的目标
一些上下文:Sciter (纯 win32 应用程序)已经能够呈现类似 UWP 的 UI: 在深色模式下: 在灯光模式下: Windows 10.1803 在设置小程序中引入深色/浅色开关 as se
我是一名优秀的程序员,十分优秀!