作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在尝试将错误文本中心向下对齐到屏幕中间时遇到一些问题,填充有效,但 <h1>
开始在一个很大的缝隙中分开,我希望它和现在一样但是在屏幕的中央。所有 <div>
那说display: none;
用于在正常工作的桌面模式下隐藏移动导航栏。
.nav2 {
display: none;
}
.nav-header{
display: none;
}
.nav-title{
display: none;
}
.nav-btn{
display: none;
}
.nav-check{
display: none;
}
#nav-check{
display: none;
}
.nav-links{
display: none;
}
.nav-header{
display: none;
}
.nav2 a {
display: none;
}
.nav-header a{
display: none;
}
.nav-title a{
display: none;
}
.nav-btn a {
display: none;
}
.nav-check a{
display: none;
}
#nav-check a{
display: none;
}
.nav-links a{
display: none;
}
.nav-header a{
display: none;
}
body > #header{position:fixed;}
#header {
width: 100%;
position: fixed;
z-index:9000;
color: #000000;
WHITE BG // color/ #8c8c8c;
font-size: 25px;
text-align: left;
font-family: 'Pacifico', cursive;
left: 15px;
top: 25px;
transition: all 0.5s linear;
transition: height 0.5s ease;
-webkit-transition: height 0.5s ease;
-moz-transition: height 0.5s ease;
-o-transition: height 0.5s ease;
-ms-transition: height 0.5s ease;
transition: background-color 0.5s ease;
-webkit-transition: background-color 0.5s ease;
-moz-transition: background-color 0.5s ease;
-o-transition: background-color 0.5s ease;
-ms-transition: background-color 0.5s ease;
transition: background-color 0.5s ease;
-webkit-animation: fadein 2s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 2s; /* Firefox < 16 */
-ms-animation: fadein 2s; /* Internet Explorer */
-o-animation: fadein 2s; /* Opera < 12.1 */
animation: fadein 2s;
}
#navigation {
width: 100%;
position: fixed;
z-index: 9000;
text-decoration: none!important;
list-style-type: none;
color: #006CFF;
font-family: 'Ubuntu', sans-serif;
font-size: 15px;
text-align: right;
margin: 22px -20px;
-webkit-animation: fadein 2s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 2s; /* Firefox < 16 */
-ms-animation: fadein 2s; /* Internet Explorer */
-o-animation: fadein 2s; /* Opera < 12.1 */
animation: fadein 2s;
}
.feedback {
text-align: center;
font-size: 22px;
color: #494949;
}
h1 {
text-align: center;
font-size: 50px;
font-weight: bolder;
color: #494949;
}
<doctype! html>
<html>
<head>
<link href="https://cdn.rawgit.com/michalsnik/aos/2.1.1/dist/aos.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Oops.. Dead End</title>
<script src="https://cdn.rawgit.com/michalsnik/aos/2.1.1/dist/aos.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-136743580-1"></script>
<div id="header">adamferreira</div>
<div id="navigation">
<ul>
<a class="nav" href="index.html"> Return Home</a>
</ul>
</div>
<div class="headerBackground"></div>
<body>
<div class="container" data-aos="ease-in-out-back" data-aos="zoom out">
<h1>Looks like this page doesn't exist</h1>
<h1 class="feedback">Please double-check you are entering the correct information in your address bar.<br> This page may also have been moved, deleted or a feature may not be available to you.</h1>
</head>
</body>
</html>
最佳答案
希望你一切顺利。以下是我在这种情况下建议的代码更改:
<div class="new">
<h1>Looks like this page doesn't exist</h1>
<h2 class="feedback">Please double-check you are entering the correct
information in your address bar.<br> This page may also have been moved,
deleted or a feature may not be available to you.</h1>
</div>
我创建了一个类名为“new”的新 div,并根据标准更改了第二个标签(将其更改为 h2)。最重要的是,在 CSS 中添加了以下内容:
.new {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
希望对您有所帮助。
关于html - 将 css 对齐到中间的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56335044/
根据 Android docs ,activity生命周期如下: onCreate() onStart() onResume() onPause() onStop() onDestroy() 问题是,
我有一门类(class)有很多专栏,但这个问题只需要其中三个: ---------------------------------------- | start_date | start_time
给定在同一个 Tomcat 6 上运行的两个 Web 应用程序。如果您从一个应用程序到另一个应用程序进行 http 调用,Tomcat 是否会“短路”此调用,或者它会在调用之前一直在 interweb
我是一名优秀的程序员,十分优秀!