CSS background Property 语法: background: bg-color bg-image position/bg-size bg-repeat bg-origin bg-clip bg-attachment initial|inherit; Note: If one of the properties in the shorthand declaration is the bg-size property, you must use a / (slash) to sep…
Body with background image and gradient html { background: linear-gradient(#000, white) no-repeat; height: 100vh; } Body with elaborate background using only CSS background-image: url("img_tree.gif"), url("paper.gif"); Using CSS backgr…
今天想做一个淘宝导航来练练手,遇到了边框覆盖的问题.如下图: li的红色边框盖不住该灰色边框.后来问经验人士告诉我,这种边框覆盖是会出现无法100%保证正常的情况,遂得到如下3中解决方案: 1.以后遇到需要边框覆盖的,一般这个被覆盖边框用1px的图片平铺,这样不占用位置,上面的来覆盖可以轻松实现. 2.在移动到改元素上时,把被覆盖边框的边框颜色设置为何覆盖边框的颜色一样. 3.基于2,在移动到改元素上时,把被覆盖边框的边框颜色设置为none. <!DOCTYPE html PUBLIC "…