我正在创建一个网站,但有一件事似乎不起作用。我想在侧面菜单中居中这个视频。视频有点在中间但不完全正确。非常令人沮丧。
<html>
<head>
<title>title</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
<a href=""> <h1>title</h1> </a>
<ul> <li><a href="default.asp">Tour</a></li>
<li><a href="news.asp">News</a></li>
<li><a href="about.asp">about</a></li>
</ul>
<iframe src="youtubevideourl" allowfullscreen></iframe>
<p>
<h2> lorem ipsim nog wat </h2>
</p>
<p>
<h2> jaja </h2>
</p>
<div style="position: absolute; bottom: 0px;">
<footer>
<p>Contact information: <a href="mailto:@gmail.com">
@gmail.com</a>.</p>
</footer>
</div>
</body>
使用此css代码
img {
display: block;
width: 20%;
}
body {
background-image: url("anbuachter.png");
}
h1{
font-family: myFirstFont;
font-size: 100px;
}
@font-face {
font-family: myFirstFont;
src: url("oldlondon.ttf");
}
iframe {
width: 560px;
height: 350px;
display: block;
margin: 0 auto;
}
h2{
text-align:center;
font-family:"Courier New";
}
footer{ font-family:"Palatino Linotype";
font-size: 15px;
}
div.jiri{
text-align:center;
font-family: myFirstFont;
font-size:30px;
padding-top: 50px;
}
a {
color:black;
text-decoration:none;
}
div.menu {
font-family: myFirstFont;
font-size: 50px;
font-weight: bold;
float: left;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
font-family: myFirstFont;
font-size: 50px;
font-weight: bold;
float: left;
}
li a
display: block;
text-align:left;
margin: 15px;
}
谁能帮帮我?
答案 0 :(得分:0)
iframe {
width: 560px;
height: 350px;
position: fixed;
left: 400px;
请告诉我这是否符合您的需要。