展示
CSS relative相对定位的最小化影响原则
√
代码
CSS代码:
.test {width:25em; margin:2em auto;} .box { padding:2em; border:1px solid #beceeb; border-radius:2px; background-color:#f0f3f9; } .rel { position:relative; } .ok { color:green; font-size:6em; position:absolute; right:-10px; top:-1em; }
HTML代码:
<div class="test"> <div class="box">CSS relative相对定位的最小化影响原则</div> <div class="rel"><strong class="ok">√</strong></div> </div>