Skip to content

Instantly share code, notes, and snippets.

@wadadanet
Last active January 7, 2020 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wadadanet/0051df2cee0a4ea8c59b41c0ff13528c to your computer and use it in GitHub Desktop.
Save wadadanet/0051df2cee0a4ea8c59b41c0ff13528c to your computer and use it in GitHub Desktop.
【初心者】Webサイト作る #4 「CSSの基礎」
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My test page</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div class="container">
<h1 class="primary-text">見出し1だよ</h1>
<h2 class="color-red">見出し2だよ</h2>
<figure class="border-image">
<img
src="images/firefox-icon.png"
alt="The Firefox logo: a flaming
fox surrounding the Earth.">
<figcaption>
At Mozilla, we’re a global community of
</figcaption>
</figure>
<p class="normal-text">Read the <a target="_blank" rel="noopener" href="https://www.mozilla.org/en-US/about/manifesto/">Mozilla Manifesto</a> to learn even more about
the values and principles that guide the pursuit of our mission.</p>
</div>
</body>
</html>
.container {
max-width: 960px;
margin: 0 auto;
}
.primary-text {
font-size: 32px;
font-weight: bold;
color: #00ff00;
}
.color-red {
color: red;
}
.border-image {
border: 1px dotted #F00;
border-radius: 5px;
padding: 10px;
margin: 10px 0;
text-align: center;
background-color: rgb(240, 210, 210);
}
.normal-text {
margin: 10px 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment