如何用css 隐藏 div右边起10像素
时间:2024-12-13 18:39:03
答案

有两种方法:一、用另一个层遮起来:<DIV style="background:#f00; width:100px; height:100px; position:relative;"> <div style="background:#fff;width:10px;height:80px; position:absolute; right:0px;"></div></DIV>二、用绝对定位层的clip属性<div style="position:absolute; width:100px; height:100px; border:1px solid blue; clip:rect(0 90px 102px 0)"></div>

推荐
© 2024 答答问 m.dadawen.com