<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style type="text/css"> body{ margin:0px; font-family:arial; font-size:12px; } #father{ background-color:#a0c8ff; border:1px solid #000000; width:300px; height:100px; position:absolute; /*绝对定位*/ left:50px; top:30px; }</style></head><body> <div id="father" id=""></div></body></html>
What does refreshing the style sheet mean? You can use an external style sheet so that it automatically renders every time you refresh the page.
You can write it this way, but after you change the style, refreshing will have an effect, because css is "static" (js needs to be refreshed after writing to have an effect)