Red often indicates a dangerous or negative situation.
Yellow and orange often indicates something that needs attention.
Green often indicates something successful or positive.
Blue often indicates a neutral informative change or action.
アラートは、色付きの w3-panel や w3-container を使用して作成することができます:
<div class="w3-panel w3-red">
<h3>Danger!</h3>
<p>Red often indicates a dangerous or negative situation.</p>
</div>
Try It Yourself ❯
<div class="w3-container w3-red">
<h3>Danger!</h3>
<p>Red often indicates a dangerous or negative situation.</p>
</div>
Try It Yourself ❯
アラートは、通常、強い色で表示しますが、あらゆる色を使用することができます:
Red often indicates a dangerous or negative situation.
Yellow often indicates something that needs attention.
Green often indicates something positive.
コンテナを閉じるには、右上隅の X をクリックしてください:
Red often indicates a dangerous or potentially negative action.
Yellow often indicates something that needs attention.
Green often indicates something successful or positive.
w3-closebtn 上の onclick イベントを使用して、アラートを閉じることができます:
<span onclick="this.parentElement.style.display='none'"
class="w3-closebtn">×</span>
Try It Yourself ❯
× は、文字 "x" よりも閉じるボタンに適したアイコンの HTML エンティティです。
コーナを丸めるには、w3-round クラスを使用します:
w3-round
w3-round-large
w3-round-xxlarge
Danger!