コーヒー – css coffee –

コーヒーアイコン アイコン

cssのみで 「コーヒー」 アイコンを作成してみました。

ソース

html

<div class="coffee"></div>

css

/* 本体 */
.coffee {
	font-size: 100px;
	position: relative;
	margin: 0.2em 0 0 0.2em;
	width: 1em;
	height: 1em;
	background-color: #39a9d6;
	border-radius: 0 0 0.2em 0.2em;
}
/* 取っ手 */
.coffee::before {
	content: "";
	position: absolute;
	top: 0.1em;
	left: 0.8em;
	width: 0.4em;
	height: 0.4em;
	border: 0.1em solid #39a9d6;
	border-radius: 0 100% 100% 0;
}
/* 皿 */
.coffee::after {
	content: "";
	position: absolute;
	top: 1.1em;
	left: -0.2em;
	width: 1.4em;
	height: 0.2em;
	background-color: #39a9d6;
	border-radius: 0 0 50% 50% /  0 0 100% 100%;
}

タイトルとURLをコピーしました