【发布时间】:2018-03-07 11:19:25
【问题描述】:
我正在尝试在我的单页网站页脚的某些文本的任一侧对齐 x2 社交媒体图标。
这是我希望它如何在桌面/宽屏幕上显示的示例。Desktop/Wide Screens
这是我希望它如何在移动/窄屏幕上显示的示例。 Mobile/Narrower Screens
我在下面输入了我到目前为止的代码(目前没有社交媒体图标)
附:我的社交媒体图标保存为 facebook.png 和 twitter.png
body {
background-color: #000;
font-family: 'Roboto Mono', 'Arial', sans-serif;
font-size: 250%;
font-weight: 300;
}
.logo {
display: block;
margin: 50px auto;
}
p {
color: #ccc;
text-align: center;
text-transform: uppercase;
letter-spacing: 3px;
}
.coming-soon {
color: #333;
letter-spacing: 3px;
}
.autumn-2017 {
color: #ccc;
}
section p {
display: block;
margin: 50px auto 10px;
font-size: 35%;
text-transform: none;
letter-spacing: 3px;
line-height: 25px;
color: #333;
}
.contact-info {
margin: 15px auto;
letter-spacing: 3px;
line-height: 25px;
color: #ccc;
text-decoration: none;
text-transform: none;
font-size: 35%;
}
a:link,
a:visited {
text-decoration: none;
color: #ccc;
transition: font-weight 0.2s;
}
a:hover,
a:active {
text-decoration: none;
color: #ccc;
font-weight: 500;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="desctription" content="Web Design & Development">
<link rel="stylesheet" type="text/css" href="normalize.css">
<link rel="stylesheet" type="text/css" href="grid.css">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="queries.css">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:100,300,400,500,700" rel="stylesheet">
<meta name="msapplication-config" content="resources/favicons/browserconfig.xml">
</head>
<body>
<header>
<div>
<img src="iz-icon-logo.png" class="logo" alt="logo">
<p><span class="coming-soon">coming soon.</span><span class="autumn-2017"> autumn 2017.</span></p>
</div>
</header>
<section>
<div>
<p>If you have a Web Design or Development enquiry,<br>please contact:</p>
<p class="contact-info"><a href="mailto:webmaster@example.com">hello@illusionzero.co.uk</a><br><a href="tel:07903490453">+44 (0) 7903 490453</a></p>
</div>
</section>
</body>
</html>
【问题讨论】:
-
您能否添加您的代码,以便我们查看您目前尝试过的内容以及问题出在哪里?
标签: html css position icons alignment