<h1 id="btn">頭部</h1>
<div>身體</div>
<p>腳</p>
h1 { margin:0 auto; width:100px; height:100px; background:red; border-radius:99em;}
div { margin:0 auto; width:150px; height:150px; background:red; border-radius:10px;}
p { margin:0 auto; width:80px; height:200px; background:red; border-radius:0 0 10px 10px;}
document.getElementById("btn").onclick = function(){ 
  fun()
};

function fun() {
  alert("不要拉我頭髮!");
};

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.