- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
window.sr = ScrollReveal();
sr.reveal('.b1', {
duration: 2000,
origin: 'top',
distance: '80px'
});
sr.reveal('.b2', {
duration: 1500,
origin: 'top',
distance: '80px'
})
sr.reveal('.b3', {
duration: 1000,
origin: 'top',
distance: '80px'
});
sr.reveal('.w1', {
duration: 3000,
origin: 'right',
distance: '200px'
});
sr.reveal('.w2', {
duration: 3500,
origin: 'right',
distance: '150px'
});
sr.reveal('.w3', {
duration: 4000,
origin: 'right',
distance: '150px'
});
sr.reveal('.h2-about', {
duration: 2000,
origin: 'top',
distance: '150px'
});
sr.reveal('.left', {
duration: 2000,
origin: 'bottom',
distance: '150px'
});
sr.reveal('.right', {
duration: 2000,
origin: 'bottom',
distance: '150px'
});
const navBtn = document.querySelector('.menu-bars');
const x = document.querySelector('.fa-times');
const b1 = document.querySelector('.b1');
const b2 = document.querySelector('.b2');
const b3 = document.querySelector('.b3');
const sideMenu = document.querySelector('.side-menu');
navBtn.addEventListener('click', () => {
x.style.left = '338px';
sideMenu.style.left = '0px';
addAnimation(b1);
addAnimation(b2);
addAnimation(b3);
function addAnimation(bar) {
bar.style.animationName = bar.className + '-animate';
}
});
const aboutDiv = document.querySelector('.about-us');
aboutDiv.addEventListener('mouseover', () => {
const line = document.querySelector('.underline');
line.style.animationName = 'line';
})
x.addEventListener('click', ()=> {
sideMenu.style.left = '-400px';
x.style.left = '-400px';
})
html, body {
margin: 0;
padding: 0;
}
.side-menu {
position: fixed;
top: 165px;
background-color: white;
width: 299.5px;
padding: 10px;
transition: all 2s ease;
left: -400px;
transition: all 0.2s ease;
z-index: 11;
}
.fa-times {
font-size: 30px;
position: fixed;
color: white;
left: -338px;
top: 168px;
transition: all 0.2s ease;
z-index: 11;
}
.fa-times:hover {
transform: scale(1.2);
}
.side-menu ul {
list-style-type: none;
text-align: center;
}
.side-menu li {
color: grey;
font-size: 1.8rem;
margin: 6px;
margin-left: -35px;
margin-bottom: 35px;
font-family: 'Josefin sans';
}
.side-menu li:hover {
color: orange;
cursor: pointer;
}
.menu-bars{
position: fixed;
left: 50px;
top: 80px;
z-index: 11;
}
.b1, .b2, .b3 {
position: relative;
width: 60px;
height: 7px;
background-color: red;
margin:.55rem;
left: 0px;
top: 0px;
border-radius: 9px;
}
.b1 {
background-color: lightgreen;
animation-duration: 0.2s;
animation-fill-mode: forwards;
animation-direction: backwards;
}
.b2 {
background-color: white;
animation-duration: 0.2s;
animation-fill-mode: forwards;
}
.b3 {
background-color: #ff4d4d;
animation-duration: 0.2s;
animation-fill-mode: forwards;
}
@keyframes b1-animate {
from {}
to {
width: 60px; height: 8px; position: relative; left: -67px; top: 49px; width: 100px; border-radius: 0; background-color: lightgreen;}
}
@keyframes b2-animate {
from {}
to {width: 60px;
height: 8px;
position: relative;
left: 33px;
top: 32.5px;
width: 150px;
height: 7.75px;
border-radius: 0;
background-color: white;}
}
@keyframes b3-animate {
from {}
to {width: 60px;
height: 8px;
position: relative;
top: 16px;
left: 161px;
width: 100px;
border-radius: 0;
background-color: #ff4d4d;}
}
.intro {
background: darkblue;
width: 100vw;
height: 100vh;
background-attachment: fixed;
background-size: cover;
margin-bottom: 0;
}
h1 {
font-family: 'Cedarville Cursive';
position: absolute;
left: 700px;
top: 50px;
color: white;
font-size: 3rem;
}
h2 {
text-align: center;
font-family: 'Cedarville Cursive';
font-size: 3rem;
padding: 30px;
color: white;
}
.about-us {
margin-top: -40px;
padding-bottom: 90px;
background-color: #339966;
width: 100vw;
}
.underline {
margin: 0;
position: absolute;
left: 570px;
bottom: -120px;
background-color: orange;
width: 0px;
height: 3px;
animation-duration: 0.7s;
animation-fill-mode: forwards;
transition-timing-function: ease-out;
}
@keyframes line {
from {left: 370px; width: 0px;}
to {left: 580px; width: 210px; border-radius: 1.5px;}
}
p {
position: relative;
padding-left: 20px;
top: -30px;
color : white;
font-size: 1.8rem;
word-spacing: 7px;
width: 400px;
font-family: 'Josefin sans';
margin-left: 155px;
}
.fa-caret-down {
position: relative;
width: 50px;
height: 50px;
font-size: 60px;
color: lightgrey;
left: 665px;
bottom: 300px;
transform: rotate(90deg);
transition: all 0.5s ease;
}
.fa-caret-down:hover {
color: white;
}
.image-slider {
background-color: darkgrey;
position: relative;
width: 440px;
height: 350px;
right: -710px;
bottom: 500px;
}
.right {
position: relative;
width: 50px;
height: 50px;
font-size: 60px;
color: lightgrey;
left: 1145px;
bottom: 715px;
transform: rotate(-90deg);
transition: all 0.5s ease;
}
.right:hover {
color: white;
}
.side-msg {
font-family: 'Cedarville Cursive';
font-size: 3rem;
color:#e6ac00;
position: relative;
right: -550px;
font-weight: bold;
top: -560px;
width: 1000px;
}
.chile {
width: 460px;
height: 345px;
position: relative;
top: 800px;
right: 0px
z-index: 11;
}
.menu-wrapper {
width: 100VW;
background-color: #e6ac00;
height: 905px;
position: relative;
top: -720px;
clip-path: polygon(0% 0%, 100% 15%, 100% 100%, 0% 100%);
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>El Metate | Mexican food</title>
<link href="https://fonts.googleapis.com/css?family=Cedarville+Cursive" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Josefin+Sans" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<script src="https://unpkg.com/scrollreveal"></script>
</head>
<body>
<header>
<nav>
<div class="side-menu">
<ul>
<li>Home</li>
<li>About</li>
<li>Menu</li>
<li>Contact</li>
<li>Location</li>
<li>News</li>
</ul>
</div>
<i class="fas fa-times"></i>
<div class="menu-bars">
<div class="b1"></div>
<div class="b2"></div>
<div class="b3"></div>
</div>
</nav>
<div class="intro">
<h1><span class="w1">Authentic</span><span class="w2">Mexican</span><span class="w3">Food</span></h1>
</div>
</header>
<section class="about">
<div class="about-us">
<h2 class="h2-about">About Us</h2>
<div class="underline"></div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quaerat est ab adipisci illo consectetur obcaecati, incidunt, nesciunt ad vitae possimus nam inventore esse impedit. Ullam soluta architecto eligendi sapiente recusandae labore necessitatibus quis similique laboriosam quas, nam explicabo numquam commodi magni mollitia itaque hic quaerat earum, nemo optio maiores in.</p>
<i class="fas fa-caret-down left"></i>
<div class="image-slider">p</div>
<i class="fas fa-caret-down right"></i>
<p class="side-msg">Taking you back to Mexico</p>
</div>
</section>
<section class="menu">
<div class="menu-wrapper"></div>
</section>
<script src="script.js"></script>
</body>
</html>
嘿,伙计,我正在为本地企业开发一个网站,我刚刚注意到屏幕右侧和底部有一些巨大的空白。我的 html 和正文的边距设置为零?这并不总是存在。它在我工作时突然出现,直到现在我才注意到它,也无法弄清楚。任何帮助都是极好的。谢谢!
最佳答案
.side-msg
类的元素宽度为 1000px,这导致了不需要的空白。如果删除它,空间应该消失。
关于javascript - 网页右侧和底部的空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52576741/
我正在寻找 css 属性以隐藏带或不带 css 类的段落,如果它包含空格 ( ) 或空白,但我想至少保留一个带或不带的段落,如果有更多的话。 隐藏段落,如果它是空白的或包含 white-space(
在 ruby 中对空白有不同的敏感度/设置吗? 我有一个 RoR 项目,其中一个事件记录调用有很多组件: max_stuff = FooSummary.select("max(stuff)
如何在脚注中的数字后留空? 一般来说,对于所有脚注! 例子: 好 : 1 Hello World 坏:1Hello World 最佳答案 正确答案是不要重新定义\thefootnote ,因为这会在脚
我有这段代码,每次第一个 for 循环再次开始时,我希望它将数组重置为空白,因为它正在使用新用户,但我得到的输出包含一个数组中的所有值。 var items = []; for (var i
我试图在CakePHP中生成一个动态xml文档,以输出到浏览器。 这是我的 Controller 代码: Configure::write ('debug', 0); $this->layout =
当我尝试在 nxos 设备上运行某些命令时,输出末尾有一个空格。我必须将输出与现有变量列表进行比较。末尾的空格导致比较错误。如何在字符串列表中使用 .strip() 函数? - name: Curre
我对 Elasticsearch 相当陌生,我一直在尝试对我的数据进行搜索,并且总是让点击部分为空。即使在数据上传和索引之后也会发生这种情况。我的映射如下: { "mappings":{
我想将about:blank页面更改为firefox插件首页页面的url。 如何更改默认的新标签页网址或可以为新标签页提供默认网址? 我正在使用Firefox附加SDK。 最佳答案 您可以结合使用Ta
我正在使用 R 并具有以下数据框示例,其中所有变量都是因子: first second third social birth control high
如何清空显示对话框的页面。下面是我的代码HTML: .ui-dialog, .ui-dialog-content { border:1px solid #cde68c; border-botto
更新“他的问题是要求我只运行一次 str ,他们已经告诉我该函数只需要一个参数)” 我试图返回第一个不重复的字符,例如:“blazqnqbla”->第一个不重复的字符是“z”,因此函数需要返回z。现在
我的登录验证有问题。问题是当我尝试使用管理员登录时,页面停止在 checklogin.php 上并且不会告诉它是否成功。这是我的代码。 索引.html Aplik
我的查询是这样的 SELECT Distinct tm.teamid,tm.Team_Name,CONCAT_WS(' ',tu.FirstName+' '+tu.LastName) as Leade
我正在创建指向页面的超链接 url 由用户输入决定,因此由查询字符串决定 ; 问题是变量状态由两个或多个单词组成。因此,当我尝试单击证明表单中输入的超链接时,仅获取状态变量的第一个单词。浏览器将另一个
该问题在每个浏览器中的表现都不同,例如在 Firefox 中大约一个空格如果您再次滚动到顶部,则会出现具有相同高度的滚动框。在 chrome 中,滚动时框会变得狭窄等等...... 使用的调用是:
我对菜单栏文字之间的 CSS 空白有疑问。我尝试了很多方法,但仍然无法解决。有人可以帮我吗? 菜单问题图片如下: http://imageshack.us/photo/my-images/201/44
我对 有疑问.其中的插入符根据是否为空具有不同的垂直位置: 我的代码: textarea { padding: 0 5px; border: none; outline: n
这个问题在这里已经有了答案: 关闭 10 年前。 Possible Duplicate: Ignore whitespace in HTML 我想在网页上将图片并排放置。这是我的 HTML:
每当我尝试检查元素时,什么都没有出现。我在使用 Chrome。我明白了 Elements | Network | Sources | Timeline | Profiles | Resources |
我在使用 Chrome、Firefox 和 IE 时遇到了一个奇怪的问题。我正在为我的投资组合网站/博客构建一个 WordPress 主题,一切都很好,直到今天,当我在 chrome 中查看该网站时,
我是一名优秀的程序员,十分优秀!