2023年6月20日发(作者:)
CSS基础--盒⼦阴影、边框圆⾓h盒⼦阴影:box-shadow: ⽔平位置(必) 垂直位置(必) 模糊距离 阴影的尺⼨ 阴影颜⾊ 阴影的种类;阴影遮挡: 给上⼀个盒⼦ position:relative;z-index:1;圆 border-radius:50%;宽⾼相等 椭圆:border-radius:1/2 ⾼图⽚覆盖圆⾓ 在盒⼦⾥ overflow:hidden背景:abackground-repeat:repeat|no-repeat|repeat-x|repeat-y;background-position:left top|left bottom|right top|rigth bottom|center center|center bottom|center top|left center|rightcenter; 也可⽤百分⽐保持图⽚缩放时位置:background-size:cover;background-position:center centerbackground-size:contain;cover 覆盖整个盒⼦ contain 缩放⾄我整个在盒⼦⾥background-attachment:scroll|fixed;background: background-color background-image background-repeat background-attachment background-position/background-size;logo 弥补⽹页加载css失败的⽅案:table
4浮动覆盖问题css书写顺序显⽰属性:display,position,float,clear⾃⾝属性: width,height,margin,padding,border,background⽂本属性:color,font,text-align,vertical-align,whitespacefont-style font-weight font-size line-height font-family选择器符合单词 中横线JS钩⼦ID 符合单词 下划线选择器 ⼩写 尽可能英⽂尽量不⽤ bottom top left right 直观命名法 不利于维护
2023年6月20日发(作者:)
CSS基础--盒⼦阴影、边框圆⾓h盒⼦阴影:box-shadow: ⽔平位置(必) 垂直位置(必) 模糊距离 阴影的尺⼨ 阴影颜⾊ 阴影的种类;阴影遮挡: 给上⼀个盒⼦ position:relative;z-index:1;圆 border-radius:50%;宽⾼相等 椭圆:border-radius:1/2 ⾼图⽚覆盖圆⾓ 在盒⼦⾥ overflow:hidden背景:abackground-repeat:repeat|no-repeat|repeat-x|repeat-y;background-position:left top|left bottom|right top|rigth bottom|center center|center bottom|center top|left center|rightcenter; 也可⽤百分⽐保持图⽚缩放时位置:background-size:cover;background-position:center centerbackground-size:contain;cover 覆盖整个盒⼦ contain 缩放⾄我整个在盒⼦⾥background-attachment:scroll|fixed;background: background-color background-image background-repeat background-attachment background-position/background-size;logo 弥补⽹页加载css失败的⽅案:table
4浮动覆盖问题css书写顺序显⽰属性:display,position,float,clear⾃⾝属性: width,height,margin,padding,border,background⽂本属性:color,font,text-align,vertical-align,whitespacefont-style font-weight font-size line-height font-family选择器符合单词 中横线JS钩⼦ID 符合单词 下划线选择器 ⼩写 尽可能英⽂尽量不⽤ bottom top left right 直观命名法 不利于维护
发布评论