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

関連タイピング
-
個人練習用の英語長文です。
プレイ回数564英語長文795打 -
jQuery基本例文集です。解説なしです。
プレイ回数928英語長文1554打 -
個人練習用のコードです
プレイ回数780英語長文1787打 -
emmetのための備考欄
プレイ回数949短文英字201打 -
CSSでよく使うプロパティのタイピング
プレイ回数327英語長文584打 -
プレイ回数547長文385打
-
CSS 3 暗記用です
プレイ回数610英語長文587打 -
自分で覚えるためにつくりました
プレイ回数2789190打
問題文
(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; }