個人練習用、h2装飾(上下に短い線)

関連タイピング
-
CSSでよく使うプロパティのタイピング
プレイ回数345英語長文584打 -
日本語訳なし、個人練習用に作った英語長文です
プレイ回数4108英語長文673打 -
おぼえたいもの自分学習用
プレイ回数1500長文英字840打 -
初心者向けです。
プレイ回数7228英語546打 -
jQuery基本例文集です。解説なしです。
プレイ回数940英語長文1554打 -
ワードプレスでよく使う分岐文です。
プレイ回数698長文記号1049打 -
解説なし、個人練習用につくりました。
プレイ回数684英語長文1054打 -
プレイ回数451長文91打
問題文
(h2{ position: relative; display: inline-block;)
h2{ position: relative; display: inline-block;
(margin-bottom: 1em; })
margin-bottom: 1em; }
(h2:before { content: ''; position: absolute;)
h2:before { content: ''; position: absolute;
(left: 50%; top: -15px; display: inline-block;)
left: 50%; top: -15px; display: inline-block;
(width: 60px; height: 5px;)
width: 60px; height: 5px;
(-webkit-transform: translateX(-50%);)
-webkit-transform: translateX(-50%);
(transform: translateX(-50%); background-color: black;)
transform: translateX(-50%); background-color: black;
(border-radius: 2px; })
border-radius: 2px; }
(h2:after { content: ''; position: absolute;)
h2:after { content: ''; position: absolute;
(left: 50%; bottom: -15px; display: inline-block;)
left: 50%; bottom: -15px; display: inline-block;
(width: 60px; height: 5px;)
width: 60px; height: 5px;
(-webkit-transform: translateX(-50%);)
-webkit-transform: translateX(-50%);
(transform: translateX(-50%);)
transform: translateX(-50%);
(background-color: black; border-radius: 2px; })
background-color: black; border-radius: 2px; }