コピペでできる!CSSとhtmlだけの左にアクセントを付けた見出しデザイン25選+1

CSS HTML
 2018.01.10
 2018.03.12

htmlとcssだけでできる見出し26選です。
見出し次第で、記事の読みやすさは大きく変わります。
左側にアクセントを付けた見出しを集めました。

色は好みで変えていただければ、かまいません。
また、基本htmlは<h1>タグを使用していますが、<h2>〜<h6>などにそのまま変更することができます。

紹介している<h1>タグには、クラス名(.cp_h1title)を付与していますが、こちらも
css部分を下記のように変更すれば、クラスをつけずに使用することも可能です。

h1 {cssの中身}

色には6桁の16進数のカラーコード(#000000)も使えますが、他に、

  • 3桁の16進数カラーコード(#000)
  • RGB色相・彩度・明度(rgb(0,0,0))
  • RGBA色相・彩度・明度・透明度(rgb(0,0,0,1))

なども使用できます。
RGBA値での指定は、サポートしていないブラウザだと、透明度だけが無視されるのではなく、色指定そのものが認識されずに無効となるので注意が必要です。

browser:  65 11 20 10 

囲みと背景 [26種]

囲み利用したしたものです。指定する種類によって印象が違うものになります。

全体を囲む時は「border: サイズ 種類 色;」のようにボーダーの位置を省略できます
角丸は「border-radius:サイズ;」で指定します。
サイズは「左上、右上、右下、左下」の順番です。全て同じ場合は省略して1つだけの記載でOKです。
また、iOS8以下やAndroid4.4.4以下対応が必要な時は「-webkit-border-radius: サイズ;」にてベンダープレフィックスの指定を追加します。指定はこちら。

左ラインでアクセント

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	padding: 0.1em 0.3em;
	border-left: 10px solid #00BCD4;
}

左ラインでアクセント+背景塗り潰し

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	padding: 0.1em 0.3em;
	border-left: 10px solid #FF5722;
	border-bottom: 1px solid #FF5722;
	background: #FFAB91;
	color:#ffffff;
}

左ライン+背景塗り潰し+影

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	padding: 0.1em 0.3em;
	border-left: 10px solid #da3c41;
	background: #f1c6c6;
	box-shadow:0px 1px 1px 0px rgba(0,0,0,0.4);
}

二重のラインで左側にアクセントをつける

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	padding: 0.1em 0.3em;
	background: #f1c6c6;
	border-left: 8px double #da3c3c;
}

左ラインと下線

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	padding: 0.1em 0.3em;
	border-left: 10px solid #1E88E5;
	border-bottom: 3px solid #B0BEC5;
}

左ラインと擬似要素で作った下線

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	padding: 0.1em 0.3em;
	border-left: 10px solid #FFA000;
}
.cp_h1title::after {
	position: absolute;
	left: 0;
	bottom: 0;
	content: '';
	width: 100%;
	height: 0;
	border-bottom: 3px solid #B0BEC5;
}

「●」でアクセントをつける

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	padding: 0.1em 0.3em;
	padding-left: 1.5em;
	vertical-align: middle;
	color: #fff;
	border-radius: 25px 0 0 25px;
	background: #26a69a;
}
.cp_h1title::before {
	font-size: .8em;
	position: absolute;
	top: .25em;
	left: .5em;
	margin-right: 8px;
	content: '●';
	color: #fff;
}

左側を斜めにカット

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	padding: .3em .3em .3em 2.3em;
	background: #FFCA28;
	color: #fff;
}
.cp_h1title:before {
	position: absolute;
	content: '';
	left: 0px;
	top: 0px;
	border: none;
	border-left: solid 2em #fafcfc;
	border-bottom: solid 2em transparent;
}

最初の文字だけ装飾

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title:first-letter {
	font-size: 2em;
	color: #303F9F;
}

擬似要素でひし形を作ってアクセントに

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	padding: .3em .3em .3em 1.3em;
}
.cp_h1title::after {
	position: absolute;
	content: '';
	bottom: .8em;
	left: .4em;
	width: 12px;
	height: 12px;
	background-color: #da3c3c;
	transform: rotate(45deg);
}

機種依存文字でチェックマーク

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	padding: .3em;
}
.cp_h1title::before {
	content: '
.cp_h1title {
padding: .3em;
}
.cp_h1title::before {
content: '\002713';/*チェックマーク*/
/*content: '\00266b';音符*/
/*content: '\002665';ハート*/
/*content: '\00272a';丸囲み星*/
/*content: '\002731';アスタリスク*/
/*content: '\002606';白抜き星*/
/*content: '\002619';葉っぱ*/
/*content: '\025b6';右向きのサンカク*/
/*content: '\025b7';白抜き右向きのサンカク*/
/*content: '\025c6';ひし形*/
/*content: '\025c7';白抜きひし形*/
/*content: '\02749';丸いアスタリスク*/
/*content: '\02668';温泉マーク*/
color: #FF5722;
}
2713';/*チェックマーク*/ /*content: '
.cp_h1title {
padding: .3em;
}
.cp_h1title::before {
content: '\002713';/*チェックマーク*/
/*content: '\00266b';音符*/
/*content: '\002665';ハート*/
/*content: '\00272a';丸囲み星*/
/*content: '\002731';アスタリスク*/
/*content: '\002606';白抜き星*/
/*content: '\002619';葉っぱ*/
/*content: '\025b6';右向きのサンカク*/
/*content: '\025b7';白抜き右向きのサンカク*/
/*content: '\025c6';ひし形*/
/*content: '\025c7';白抜きひし形*/
/*content: '\02749';丸いアスタリスク*/
/*content: '\02668';温泉マーク*/
color: #FF5722;
}
266b';音符*/ /*content: '
.cp_h1title {
padding: .3em;
}
.cp_h1title::before {
content: '\002713';/*チェックマーク*/
/*content: '\00266b';音符*/
/*content: '\002665';ハート*/
/*content: '\00272a';丸囲み星*/
/*content: '\002731';アスタリスク*/
/*content: '\002606';白抜き星*/
/*content: '\002619';葉っぱ*/
/*content: '\025b6';右向きのサンカク*/
/*content: '\025b7';白抜き右向きのサンカク*/
/*content: '\025c6';ひし形*/
/*content: '\025c7';白抜きひし形*/
/*content: '\02749';丸いアスタリスク*/
/*content: '\02668';温泉マーク*/
color: #FF5722;
}
2665';ハート*/ /*content: '
.cp_h1title {
padding: .3em;
}
.cp_h1title::before {
content: '\002713';/*チェックマーク*/
/*content: '\00266b';音符*/
/*content: '\002665';ハート*/
/*content: '\00272a';丸囲み星*/
/*content: '\002731';アスタリスク*/
/*content: '\002606';白抜き星*/
/*content: '\002619';葉っぱ*/
/*content: '\025b6';右向きのサンカク*/
/*content: '\025b7';白抜き右向きのサンカク*/
/*content: '\025c6';ひし形*/
/*content: '\025c7';白抜きひし形*/
/*content: '\02749';丸いアスタリスク*/
/*content: '\02668';温泉マーク*/
color: #FF5722;
}
272a';丸囲み星*/ /*content: '
.cp_h1title {
padding: .3em;
}
.cp_h1title::before {
content: '\002713';/*チェックマーク*/
/*content: '\00266b';音符*/
/*content: '\002665';ハート*/
/*content: '\00272a';丸囲み星*/
/*content: '\002731';アスタリスク*/
/*content: '\002606';白抜き星*/
/*content: '\002619';葉っぱ*/
/*content: '\025b6';右向きのサンカク*/
/*content: '\025b7';白抜き右向きのサンカク*/
/*content: '\025c6';ひし形*/
/*content: '\025c7';白抜きひし形*/
/*content: '\02749';丸いアスタリスク*/
/*content: '\02668';温泉マーク*/
color: #FF5722;
}
2731';アスタリスク*/ /*content: '
.cp_h1title {
padding: .3em;
}
.cp_h1title::before {
content: '\002713';/*チェックマーク*/
/*content: '\00266b';音符*/
/*content: '\002665';ハート*/
/*content: '\00272a';丸囲み星*/
/*content: '\002731';アスタリスク*/
/*content: '\002606';白抜き星*/
/*content: '\002619';葉っぱ*/
/*content: '\025b6';右向きのサンカク*/
/*content: '\025b7';白抜き右向きのサンカク*/
/*content: '\025c6';ひし形*/
/*content: '\025c7';白抜きひし形*/
/*content: '\02749';丸いアスタリスク*/
/*content: '\02668';温泉マーク*/
color: #FF5722;
}
2606';白抜き星*/ /*content: '
.cp_h1title {
padding: .3em;
}
.cp_h1title::before {
content: '\002713';/*チェックマーク*/
/*content: '\00266b';音符*/
/*content: '\002665';ハート*/
/*content: '\00272a';丸囲み星*/
/*content: '\002731';アスタリスク*/
/*content: '\002606';白抜き星*/
/*content: '\002619';葉っぱ*/
/*content: '\025b6';右向きのサンカク*/
/*content: '\025b7';白抜き右向きのサンカク*/
/*content: '\025c6';ひし形*/
/*content: '\025c7';白抜きひし形*/
/*content: '\02749';丸いアスタリスク*/
/*content: '\02668';温泉マーク*/
color: #FF5722;
}
2619';葉っぱ*/ /*content: '5b6';右向きのサンカク*/ /*content: '5b7';白抜き右向きのサンカク*/ /*content: '5c6';ひし形*/ /*content: '5c7';白抜きひし形*/ /*content: '749';丸いアスタリスク*/ /*content: '668';温泉マーク*/ color: #FF5722; }

擬似要素でタブをつける

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	background: #4DD0E1;
	padding: 0.3em;
	border-radius: 0 5px 5px 5px;
	color: #fff;
}
.cp_h1title:after {
	position: absolute;
	content: '
.cp_h1title {
position: relative;
background: #4DD0E1;
padding: 0.3em;
border-radius: 0 5px 5px 5px;
color: #fff;
}
.cp_h1title:after {
position: absolute;
content: '\002713 Check';
background: #00ACC1;
color: #fff;
left: 0px;
bottom: 100%;
border-radius: 5px 5px 0 0;
padding: .1em .5em 0em .3em;
font-size: .5em;
letter-spacing: 0.05em;
}
2713 Check'; background: #00ACC1; color: #fff; left: 0px; bottom: 100%; border-radius: 5px 5px 0 0; padding: .1em .5em 0em .3em; font-size: .5em; letter-spacing: 0.05em; }

擬似要素でブロックを作ってアクセントに

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	background: #f1c6c6;
	padding: .3em;
	border-left: solid 2em #da3c3c;
}
.cp_h1title:before {
	position: absolute;
	content: "
.cp_h1title {
position: relative;
background: #f1c6c6;
padding: .3em;
border-left: solid 2em #da3c3c;
}
.cp_h1title:before {
position: absolute;
content: "\002713";
padding: 0em;
color: #fff;
left: -1.5em;
top: 50%;
transform: translateY(-50%);
}
2713"; padding: 0em; color: #fff; left: -1.5em; top: 50%; transform: translateY(-50%); }

擬似要素で丸いシールを作ってアクセントに

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	margin-left: .8em;
	padding: 0.1em 0.3em 0.1em 1.5em;
	color: #fff;
	border-radius: 0 30px 30px 0;
	background: #ffb74d;
}
.cp_h1title:before {
	line-height: 1.6em;
	position: absolute;
	top: 50%;
	left: -.8em;
	display: inline-block;
	width: 1.7em;
	height: 1.7em;
	padding: 0;
	content: '
.cp_h1title {
position: relative;
margin-left: .8em;
padding: 0.1em 0.3em 0.1em 1.5em;
color: #fff;
border-radius: 0 30px 30px 0;
background: #ffb74d;
}
.cp_h1title:before {
line-height: 1.6em;
position: absolute;
top: 50%;
left: -.8em;
display: inline-block;
width: 1.7em;
height: 1.7em;
padding: 0;
content: '\002713';
transform: translateY(-50%);
text-align: center;
color: #fff;
border: solid 3px #fafcfc;
border-radius: 50%;
background: #fb8c00;
}
2713'; transform: translateY(-50%); text-align: center; color: #fff; border: solid 3px #fafcfc; border-radius: 50%; background: #fb8c00; }

擬似要素で左に吹き出しをつける

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	padding-left: 35px;
}
.cp_h1title:before{
	position: absolute;
	content: "
.cp_h1title {
position: relative;
padding-left: 35px;
}
.cp_h1title:before{
position: absolute;
content: "\002713";
background: #1E88E5;
color: #fff;
font-size: .7em;
top: 50%;
left: 0;
width: 1.5em;
height: 1.5em;
line-height: 1.5em;
text-align: center;
border-radius: 50%;
transform: translateY(-50%);
}
.cp_h1title:after {
content: '';
display: block;
position: absolute;
top: 50%;
left: 0.9em;
height: 0;
width: 0;
border-style: solid;
border-width: 6px 0 6px 10.4px;
border-color: transparent transparent transparent #1E88E5;
transform: translateY(-50%);
}
2713"; background: #1E88E5; color: #fff; font-size: .7em; top: 50%; left: 0; width: 1.5em; height: 1.5em; line-height: 1.5em; text-align: center; border-radius: 50%; transform: translateY(-50%); } .cp_h1title:after { content: ''; display: block; position: absolute; top: 50%; left: 0.9em; height: 0; width: 0; border-style: solid; border-width: 6px 0 6px 10.4px; border-color: transparent transparent transparent #1E88E5; transform: translateY(-50%); }

「●」を使った吹き出し

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	padding: 0.1em 0.5em;
	margin-left: 1.5em;
	background: #F06292;
	border-radius: 30px;
	color: #ffffff;
}
.cp_h1title:before{
	position: absolute;
	content: "●";
	font-size: 0.7em;
	left: -2.6em;
	bottom: -0.5em;
	color: #F06292;
}
.cp_h1title:after{
	position: absolute;
	content: "●";
	font-size: 1.3em;
	left: -0.9em;
	bottom: -0.4em;
	color: #F06292;
}

左にラインでアクセントをつけて囲む

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	padding: .1em .3em .1em 1em;
	border: 1px solid #00BCD4;
}
.cp_h1title::after {
	position: absolute;
	top: .5em;
	left: .5em;
	content: '';
	width: 6px;
	height: -webkit-calc(100% - 1em);
	height: calc(100% - 1em);
	background-color: #00BCD4;
	border-radius: 4px;
}

左にはみ出したラインでアクセントをつける

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position:relative;
	padding: 0.1em 0.3em;
	border: 1px solid #F48FB1;
}
.cp_h1title:before {
	content: "";
	position: absolute;
	top: 5px;
	left: -5px;
	width: 10px;
	height: calc(100% - 10px);
	background-color: #EC407A;
	border-radius: 4px;
}

左のラインを2色に分ける

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	padding: .1em .3em .1em .5em;
	border-left: 6px solid #26C6DA;
}
.cp_h1title::before {
	position: absolute;
	content: '';
	left: -6px;
	bottom: 0;
	width: 6px;
	height: 50%;
	background-color: #1A237E;
}
.cp_h1title::after {
	position: absolute;
	content: '';
	left: 0;
	bottom: 0;
	width: 100%;
	height: 0;
	border-bottom: 1px solid #26C6DA;
}

アイテムをカウントさせる

ニャン易度

見出しテキスト

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
body {
	counter-reset: titleNum;
}
h1.cp_h1title {
	counter-increment: titleNum;
}
.cp_h1title {
	position: relative;
	padding: .1em .3em .1em 1.5em;
	border-bottom: 1px solid #FFCC80;
}
.cp_h1title::before {
	position: absolute;
	content: counter(titleNum);
	color: #fff;
	font-size: .9em;
	text-align: center;
	top: calc(50% - 0.75em);
	left: 0;
	width: 1.5em;
	height: 1.5em;
	line-height: 1.5em;
	background-color: #FF9800;
	border-radius: 100%;
}

擬似要素で作った種類の違う丸を二つ重ねてアクセントに

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	padding: .1em .3em .1em 1.3em;
	border-bottom: 1px solid #00838F;
}
.cp_h1title::before,.cp_h1title::after {
	position: absolute;
	content: '';
	border-radius: 100%
}
.cp_h1title::before {
	top: .5em;
	left: .2em;
	width: 18px;
	height: 18px;
	background: rgba(0,131,143,.7);
}
.cp_h1title::after {
	top: .8em;
	left: .5em;
	width: 13px;
	height: 13px;
	background: rgba(0,131,143,.5);
}

擬似要素で作る二つ重ねた四角がアクセント

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	padding: .1em .3em .1em 1.3em;
}
.cp_h1title::before,.cp_h1title::after {
	position: absolute;
	content: "□";
	width:4px;
	height: 4px;
	color: #FBC02D;
}
.cp_h1title::before {
	left:0;
	top:0;
}
.cp_h1title::after {
	left: 5.5px;
	top: 7.5px;
}

擬似要素で左にカチンコのような四角をつける

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position:relative;
	padding: .1em .3em .1em 1em;
}
 
.cp_h1title:before{
	position: absolute;
	content: '';
	height: 15px;
	width: 13px;
	display: block;
	background: #00BCD4;
	top: 0.3em;
	left: 3px;
	transform: rotate(-50deg);
}
.cp_h1title:after{
	position: absolute;
	content: '';
	height: 13px;
	width: 6px;
	display: block;
	background: #00BCD4;
	top: 0.8em;
	left: 2px;
	transform: rotate(-90deg);
}

擬似要素を使って左に二重のひし形マーク

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	padding: .1em .3em .1em 1em;
	border-bottom: 1px solid #FFB300;
}
.cp_h1title:before,.cp_h1title:after {
	position: absolute;
	content: "";
	display: block;
	width: 12px;
	height: 12px;
	border: 2px solid #da3c3c;
	top: 40%;
	left: 3px;
	transform: rotate(45deg);
}
.cp_h1title:after {
	top: 40%;
	left: 10px;
	height: 12px;
	width: 12px;
	transform: rotate(45deg);
	border: none;
	background: rgba(255,179,0,.3);
}

擬似要素を使って左にリボン帯

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position: relative;
	padding: .1em .3em .1em 1.5em;
	background: #90CAF9;
	border-radius: 4px;
	color:#ffffff;
}
.cp_h1title:before,.cp_h1title:after {
	content: "";
	position: absolute;
	display: block;
}
.cp_h1title:before{
	top: -0.1em;
	left: 0.5em;
	width: 20px;
	height: 23px;
	padding: 5px 0 0 0;
	background: #1976D2;
	text-align: center;
}
.cp_h1title:after{
	top: .35em;
	left: .5em;
	width: 0;
	height: 0;
	border: 10px solid;
	border-color: transparent #1976D2;
}

擬似要素で作る旗のようなデザイン

ニャン易度

見出しテキスト

<h1 class="cp_h1title">見出しテキスト</h1>
.cp_h1title {
	position:relative;
	padding: .1em .3em;
	color:#fff;
	background:#EC407A;
	margin-left: 0.3em;
}
.cp_h1title:before{
	position: absolute;
	content: '<';
	top: 30%;
	left: -0.5em;
	width: 0;
	height: 0;
	font-size: 25px;
	line-height: 1.0;
	color: #FDD835;
}
.cp_h1title:after{
	content:" ";
	position:absolute;
	top: -2px;
	left: -10px;
	width: 0;
	height: 160%;
	border: 2px solid #5D4037;
	border-radius: 2px;
	transform: rotate(-2deg);
}

copypet.jp

CSS3などで新たに追加された要素・装飾方法など、日々コードを書いていないと忘れてしまったり、ささっとプロトタイプを作る時などちょっとしたことに時間をかけている暇はない。そんな時に「あ〜、あれストックしときゃよかったなぁ」って困った自分用のストックブログです。カスタマイズなどがしやすいよう、昨今のweb制作に取り入れられる一般的なコードを中心に掲載しています。

More Info

こんな記事はいかがですか?