html背景与边框

1.        浏览器默认字体大小是font-size:16px;谷歌最小字体是10px,其他浏览器是12px

 

3.        background 背景

   背景颜色 background-color:red;  简写backgroundred

  背景图片 background-image:url(“路径”);简写 background:url();

  备注  标签请求外面资源有三种属性  href  src  url

  Ie9以下给body设置background-color 不起作用需要用bgcolor

 

  例如:<body bgcolor="red">

      <p>hello</p>

      </body>

 

  背景图片平铺:

 

  1.        平铺浏览器默认就平铺

 

  2.        不平铺 no-repeat

 

  3.        平铺x轴或y background-repeat:repeat-x;

    例如:background-repeat:repeat-x;

                repeat-y

 

 

  背景大小

  background-size:100%   100%;

  第一个为x轴上的值     第二个为y轴上的值

 

  Background-size:;属性值有哪些写法?

 

  A,可以设置具体的大小  200px  200px auto 自适应(一般做属性值)

 

  背景位置background-position  也是坐标轴向下为正向右为正数

    例如:   background-position:100px     100px

                   位置的值的种类:具体数字     百分比      英文单词(top   left    right   bottom    center)

 

  背景简写

   例如:body{     background:    ####      url("img.……png")      no-repeat       right  top

        }                      颜色          图片                          平铺                 位置

 

  边框 border

    border-color边框颜色

    border-style边框样式

    border-width边框粗细

 

  Border简写

         例如:border:blue   1px   dashed;

 

   边框圆角  border-radius  后面的值是具体的数字   或百分比

 

posted @ 2018-09-12 19:47  前端*迷途者  阅读(508)  评论(0编辑  收藏  举报