<h1 class="title1">左線と背景色のある見出し</h1>
<h1 class="title2">途中で色の変わる下線がある見出し</h1>
<h1 class="title3">下破線のある見出し</h1>
<h1 class="title4">リボン風の見出し</h1>
<h1 class="title5">括弧つきの見出し</h1>
.title1 {
margin: 40px 20px;
padding: 12px 24px;
background-color: #eee;
border-left: 5px solid #008dab;
}
.title2 {
margin: 40px 20px;
padding: 12px 24px;
position: relative;
}
.title2::after {
content: "";
width: 100%;
height: 3px;
background: linear-gradient(90deg,#008dab 0%,#008dab 30%,#eee 30%,#eee 100%);
position: absolute;
bottom: 0;
left: 0;
}
.title3{
margin: 40px 20px;
padding: 12px 24px;
border-bottom: 3px dashed #008dab;
}
.title4 {
margin: 40px 20px;
padding: 12px 24px;
background-color: #008dab;
color: white;
position: relative;
}
.title4::after {
content: '';
border: none;
border-bottom: solid 16px transparent;
border-right: solid 24px #aaa;
position: absolute;
bottom: -16px;
left: 0;
}
.title5 {
margin: 40px 20px;
padding: 12px 24px;
position: relative;
}
.title5::before {
content: "";
width: 16px;
height: 24px;
border-top: 3px solid #008dab;
border-left: 3px solid #008dab;
position: absolute;
top: 0;
left: 0;
}
.title5::after {
content: "";
width: 16px;
height: 24px;
border-bottom: 3px solid #008dab;
border-right: 3px solid #008dab;
position: absolute;
bottom: 0;
right: 0;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.