我目前正在尝试使用Html,CSS和JavaScript为自己创建一个个人投资组合网站,而我目前只是添加一些基本的CSS供我使用,同时我获得更多页面&#39 ; Html开发和东西。有人可以告诉我如何获得H1" Logo"保持左对齐,但超链接保持在同一行内的页面中心?谢谢!这是我的代码:
的index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Dean Mysliwiec - Home</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Barlow+Condensed:100,200,300,300i,400" rel="stylesheet">
</head>
<body>
<p>
<h1 style="display: inline;">Dean Mysliwiec</h1>
<a href="index.html" class="main">Home Page</a>
<a href="photos.html" class="main">Photography</a>
<a href="websites.html" class="main">Website Work</a>
<a href="music.html" class="main">Music</a>
<a href="contact.html" class="main">Contact Me</a>
</p>
<h2>Welcome To My Personal Portfolio Website!</h2>
<h3>Here you will find all of my public work!</h3>
</body>
</html>
stylesheet.css中:
body {
background: #4a0a14;
}
h1 {
text-align: left;
color: #4ba8bd;
font-family: 'Barlow Condensed';
font-weight: 400;
font-style: italic;
font-size: 50px;
border: 4px solid #18687a;
width: 253px;
padding: 5px 3px 5px 3px;
background: #281f2e;
border-radius: 3px;
}
h2 {
text-align: center;
color: #5fa7b8;
font-family: 'Barlow Condensed';
font-weight: 300;
font-size: 40px;
}
.main {
font-family: 'Barlow Condensed';
font-weight: 200;
font-size: 30px;
color: #7cd2e6;
border: 1px solid #72a3ad;
background: #26202b;
padding: 5px 13px 5px 13px;
text-decoration: none;
border-radius: 20px;
text-shadow: 3px 3px 8px #4c464f;
text-align: center;
}
h3 {
font-family: 'Barlow Condensed';
font-weight: 100;
font-size: 30px;
color: #5fc7a4;
text-align: center;
}
答案 0 :(得分:-1)
为什么在h1
内插入a
和p
?你知道div
吗? nav
? ul > li
?
为什么在HTML中使用.css
文件+内联样式?
了解HTML结构,imho。
学习flexbox,它是你问题的答案。
答案 1 :(得分:-1)
[self.xmppStream oldSchoolSecureConnectWithTimeout:60.f error:&connectionError]
这将导致您的答案添加&amp; nbsp