CSSでメモを作成する方法は?
CSSで「メモ」を作成するためのコードは次のとおりです-
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body{
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
div {
margin-bottom: 15px;
padding: 4px 12px;
font-size: 18px;
}
.danger {
background-color: #ffdddd;
border-left: 6px solid #f44336;
}
.success {
background-color: #ddffdd;
border-left: 6px solid #4CAF50;
}
.info {
background-color: #e7f3fe;
border-left: 6px solid #2196F3;
}
</style>
</head>
<body>
<h1 style="text-align: center;">Notes Example</h1>
<div class="danger">
<p><strong>Danger!</strong>Operation may damage your computer</p>
</div>
<div class="success">
<p><strong>Success!</strong> Operation has been performed successfully</p>
</div>
<div class="info">
<p><strong>Info!</strong> Need more resources to perform this operation</p>
</div>
</body>
</html> 出力
上記のコードは次の出力を生成します-
-
CSSで4列のレイアウトグリッドを作成するにはどうすればよいですか?
CSSを使用して4列のレイアウトグリッドを作成するには、コードは次のとおりです- 例 <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdan
-
CSSでチェックマーク/チェックマークを作成する方法
CSSを使用してカスタマイズされたチェックマークを作成できます。次の例は、この効果を示しています- 例 <!DOCTYPE html> <html> <style> div { margin: 2%; position: relative; width: 40px; height: 40px; box-shadow: inset 0 0 12px lightblue; } div::before { co