ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# 属性 - 定位 ``` <pre class="calibre14">``` position:static <span class="token">|</span> relative相对定位 <span class="token">|</span> absolute绝对定位 <span class="token">|</span> fixed z<span class="token">-</span>index<span class="token2">:</span><span class="token3">1</span><span class="token2">;</span> top<span class="token2">:</span><span class="token3">50</span><span class="token">%</span><span class="token2">;</span> left<span class="token2">:</span><span class="token3">50</span><span class="token">%</span><span class="token2">;</span> ``` ``` - 布局 ``` <pre class="calibre14">``` display:none隐藏 <span class="token">|</span> inline内联 <span class="token">|</span> block块元素 <span class="token">|</span> inline<span class="token">-</span>block内联块 float:none <span class="token">|</span> left <span class="token">|</span> right 不浮动左浮动 右浮动 clear: left <span class="token">|</span> right <span class="token">|</span> both 清理浮动 visibility:visible <span class="token">|</span> hidden可见<span class="token">/</span>隐藏 overflow<span class="token">|</span>overflow<span class="token">-</span>x<span class="token">|</span>overflow<span class="token">-</span>y<span class="token2">:</span> hidden <span class="token">|</span> scroll 超出部分隐藏<span class="token">/</span>滚动 margin<span class="token2">:</span>上 右下左 外补白 padding<span class="token2">:</span>上右下左 内补白 ``` ``` - 边框 ``` <pre class="calibre14">``` border<span class="token2">:</span><span class="token3">5</span>px solid #<span class="token3">000</span><span class="token2">;</span> dashed虚线 dotted点线 border<span class="token">-</span>radius<span class="token2">:</span><span class="token3">1</span>px 圆角 border<span class="token">-</span>style<span class="token2">:</span>none 隐藏边框 ``` ``` - 背景 ``` <pre class="calibre14">``` background<span class="token">-</span>color <span class="token2">:</span>#<span class="token3">000</span><span class="token2">;</span> 默认transparent透明 background<span class="token">-</span>image <span class="token2">:</span><span class="token1">url</span><span class="token2">(</span><span class="token2">)</span> 默认none background<span class="token">-</span>repeat <span class="token2">:</span> repeat<span class="token">-</span>x: 背景图像在横向上平铺 repeat<span class="token">-</span>y: 背景图像在纵向上平铺 repeat: 背景图像在横向和纵向平铺 no<span class="token">-</span>repeat: 背景图像不平铺 background<span class="token">-</span>attachment<span class="token2">:</span> fixed: 背景图像相对于窗体固定。 scroll: 背景图像相对于元素固定 background<span class="token">-</span>position:<span class="token3">0</span><span class="token">%</span> <span class="token3">0</span><span class="token">%</span> 指定对象的背景图像位置。 background<span class="token">-</span>origin: 指定对象的背景图像显示的原点。 background<span class="token">-</span>clip: 指定对象的背景图像向外裁剪的区域。 background<span class="token">-</span>size<span class="token2">:</span> auto: 背景图像的真实大小。 cover: 将背景图像等比缩放到完全覆盖容器,背景图像有可能超出容器。 contain: 将背景图像等比缩放到宽度或高度与容器的宽度或高度相等,背景图像始终被包含在容器内。 ``` ``` - 字体 ``` <pre class="calibre14">``` color<span class="token2">:</span><span class="token1">rgba</span><span class="token2">(</span><span class="token3">0</span><span class="token2">,</span><span class="token3">0</span><span class="token2">,</span><span class="token3">0</span><span class="token2">,</span><span class="token3">.5</span><span class="token2">)</span><span class="token2">;</span><span class="token2">}</span> opacity<span class="token2">:</span><span class="token3">.5</span><span class="token2">;</span> <span class="token3">1</span>不透明 <span class="token3">0</span>透明 font<span class="token">-</span>style:normal <span class="token">|</span> italic 正常<span class="token">/</span>斜体 font<span class="token">-</span>weight:normal <span class="token">|</span> bold正常<span class="token">/</span>粗体 <span class="token3">700</span>粗体 font<span class="token">-</span>size:<span class="token3">16</span>px font<span class="token">-</span>family<span class="token2">:</span>helvetica<span class="token2">,</span>verdana<span class="token2">,</span>sans<span class="token">-</span>serif<span class="token2">;</span> text<span class="token">-</span>transform:none <span class="token">|</span> capitalize <span class="token">|</span> uppercase <span class="token">|</span> lowercase 不转换<span class="token">/</span>首字母<span class="token">/</span>大写<span class="token">/</span>小写 text<span class="token">-</span>align<span class="token2">:</span>left <span class="token">|</span> right <span class="token">|</span> center text<span class="token">-</span>indent<span class="token2">:</span><span class="token3">20</span>px 缩进 line<span class="token">-</span>height<span class="token2">:</span><span class="token3">22</span>px 行高<span class="token">=</span>高居中 vertical<span class="token">-</span>align:baseline <span class="token">|</span> sub下标 <span class="token">|</span> super上标 <span class="token">|</span> top <span class="token">|</span> middle ``` ``` - 列表 ``` <pre class="calibre14">``` list<span class="token">-</span>style<span class="token">-</span>image<span class="token2">:</span><span class="token1">url</span><span class="token2">(</span><span class="token2">)</span> list<span class="token">-</span>style<span class="token">-</span>type:disc 实心圆<span class="token">|</span> circle 空心圆<span class="token">|</span> square实心方块 <span class="token">|</span> decimal 数字 none不显示<span class="token">|</span>lower<span class="token">-</span>alpha小写 <span class="token">|</span> upper<span class="token">-</span>alpha大写 list<span class="token">-</span>style<span class="token">-</span>position:outside <span class="token">|</span> inside 文本外<span class="token">/</span>文本内 ``` ``` - 其他 ``` <pre class="calibre16">``` border<span class="token">-</span>collapse:separate <span class="token">|</span> collapse边框独立<span class="token">/</span>合并 outline<span class="token">-</span>style:none 无轮廓 cursor<span class="token2">:</span>pointer<span class="token2">;</span>鼠标 ``` ```