リボン風

DEMO

見出し文字が入ります。

HTMLとCSSをまとめてコピーする

HTML

		<h2 class="head02">
<span>見出し文字が入ります。</span>
</h2>
		
HTMLをコピーする

HTML説明

必要な文字に打ち換えてご使用ください。

CSS

		<style>
.head02 {
    position: relative;
    width: 90%;
	max-width: 500px;
    margin: 0 auto;
    padding: .5em .7em;
    background-color: #fa83fc;
    color: #fff;
    text-align: center;
}

.head02::before,
.head02::after {
    position: absolute;
    bottom: -10px;
    z-index: -1;
    border-style: solid;
    border-color: #ea73ec;
    content: '';
}

.head02::before {
    left: -30px;
    border-width: 25px 25px 25px 15px;
    border-left-color: transparent;
}

.head02::after {
    right: -30px;
    border-width: 25px 15px 25px 25px;
    border-right-color: transparent;
}

.head02 span::before,
.head02 span::after {
    position: absolute;
    bottom: -10px;
    width: 10px;
    height: 10px;
    background-color: #9a239c;
    content: '';
}

.head02 span::before {
    left: 0;
    clip-path: polygon(0 0, 100% 0%, 100% 100%);
}

.head02 span::after {
    right: 0;
    clip-path: polygon(0 0, 100% 0%, 0% 100%);
}
</style>
		
cssをコピーする

CSS説明

こちらは特に編集する必要はありません。
詳しい方は色やフォントなど自由に編集してご使用ください。