<head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>控制類名</title><style type="text/css">input{font-size:9px};one{width:200px;background-color:#0F0;color:#9FF;}two{height:300px;background:#0F3;color:#9FC;}three{height:200px;background-color:#0F6;color:#9F9;}four{height:100px;background:url(file:///C|/Users/Administrator/Desktop/%E6%96%B0%E5%BB%BA%E6%96%87%E4%BB%B6%E5%A4%B9%20(3)/%E6%9E%AB%E5%8F%B6%20%E6%96%87%E5%AD%97/t01cb498b8eadccb8c1.jpg);color:#9F6;}five{clip:rect(auto, auto, auto, auto);}</style></head><body><p id="p1" class="one">仿佛悲傷的人們能靠著霧霾遮住傷口還羨慕著期待藍天的少年總抬頭</p><p id="p2">圍觀的 自愿的 做崇拜者</p><p id="p3">貪婪的 欺騙著 初學者</p><p id="p4">勸說者 自私的 做挑撥者</p><p id="p5">脆弱的 羨慕者 被安撫著</p><script type="text/javascript">function p(){?var p1=document.getElementById("p1");?p1.className="one";?var p2=document.getElementById("p2");?p2.className="two";?var p3=document.getElementById("p3");?p3.className="three";?var p4=document.getElementById("p4");?p4.className="four";?var p5=document.getElementById("p5");?p5.className="five";}?document.write(p());?</script></body></html>
為什么無法顯示我已經定義的類的樣式
慕粉13727861792
2017-01-25 16:54:16