見つけたらここに追記していきます。
気軽に使えるもの重視なので、難しいものは載せません。
見出しのサイドにボーダーを配置するCSS
HTML
<h1 class="has-lines">見出し</h1>
CSS
.has-lines {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
text-align: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
}
.has-lines:before,
.has-lines:after {
content: '';
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
height: 1px;
background: #ccc;
min-width: 20px;
display: inline-block;
vertical-align: middle;
}
.has-lines:before {
margin-right: 20px;
}
.has-lines:after {
margin-left: 20px;
}
See the Pen ObvRQB by Yoshimune (@hachidaime) on CodePen.
他の記事を検索: