我正在网站上工作,我正在尝试使其响应所有分辨率,但没有成功..这是HTML:
<body>
<div class = "container">
<div class = "header">
<h1 class = " naslov "> Lorem ipsum nasov je? </h1>
<p class = "naslov-text">
"Lorem ipsum dolor sit amet, consectetur adipisicing elit."
</p>
</div>
</div>
</body>
Run Code Online (Sandbox Code Playgroud)
这是css:
body
{
width:1920px;
background-color: #f8e0b3;
height:1080px;
}
div.container
{
width:100%;
height:100%;
}
div.header
{
background:url(img/header.jpg);
width:100%;
height:46%;
margin-top:;
margin-left:;
border-bottom: 2px solid black;
}
h1.naslov
{
font-size:60px;
color:white;
margin:0 auto;
margin-left:28%;
font-family: Aramis;
}
p.naslov-text
{
font-size:40px;
color:#634ea9;
margin:0 auto;
width:1000px;
margin-top:0%; …Run Code Online (Sandbox Code Playgroud) 抱歉,我刚刚开始学习 javascript,提出了一个小问题。
所以我想制作隐藏的功能slika[0]。
function hide() {
this.style.display ='none';
};
slika[0] = setTimeout(hide, 4000);
Run Code Online (Sandbox Code Playgroud)
错误是:
TypeError: this.style is undefined
this.style.display ='none';
Run Code Online (Sandbox Code Playgroud)