美文网首页
css常见样式

css常见样式

作者: 楼水流云 | 来源:发表于2019-10-09 16:55 被阅读0次

    top 上
    right 右
    bottom 下
    left 左

    width 宽
    max-width 最大宽度 设置后不会出现滚动条
    min-width 最小宽度

    height 高
    max-height 最大高度
    min-height 最小高度

    边框 border
    border-width:1px; 边框的粗细
    border-color:transparent; 边框的颜色/透明
    border-style:solid; dotted dashed 边框的类型
    border-bottom: none; 上下左右边框
    border-radius: 1px 1px 1px 1px; 50% 边框圆角

    内边距 padding 百分比相对于父容器 不是自身
    padding-top
    padding-left
    padding-right
    padding-bottom

    外边距 margin 百分比相对于父容器 不是自身 外边距合并问题
    margin-top
    margin-left
    margin-right
    margin-bottom

    边框
    box-shadow: inset 5px 5px 3px 6px red 盒子阴影
    inset(向内 默认外向)(x轴)(y轴)(模糊半径)(模糊扩散)(颜色)

    border-image 边框用图片代替
    border-image-source:url(img url)
    border-image-width:1
    border-image-slice:number|%|fill; 获取图片的某一部分

    清除浏览器自带样式 *{
    margin: 0;
    padding: 0;
    }

    -webkit-appearance:none; 默认样式去除 input的
    outline: none; 勾选状态框去除
    cursor: pointer 让鼠标放上去 变成一个手的 按东西的形状

    相关文章

      网友评论

          本文标题:css常见样式

          本文链接:https://www.haomeiwen.com/subject/tsqcpctx.html