zoukankan      html  css  js  c++  java
  • css基础入门

    如果说html只是一些标签,css就是装修装饰标签的皮肤

    有些html是有默认自带一些css样式的,正常情况下是需要把默认样式去掉的,因为会影响页面样式,而且默认的很不美观,比如,body标签自带8px的margin,p标签自带上下margin,ul里的li自带黑色的点,按钮自带背景颜色,border边框,input输入框自带outline边框,border边框等等

    常用的css样式有

    1. margin 外边距
    2. padding 内边距
    3. border 盒子边距
      一个300px的正方形div,padding是10px,margin是10px,border是10px,那这个div是实际大小是300+60,因为他是个标准盒子模型,在css3里出现了新盒子模型,这个在css3里单独讲
    4. color 字体颜色 color会给没有设置border-color的border添加相同的颜色
    5. background-color 背景颜色
    6. float 浮动
    7. display 标签类型
    8. font-size 文字大小
    9. font-weight 文字粗细
    10. text-align 行内元素以及文字的对齐方向
    11. position 定位 定位口诀:子相absolute父绝relative/fixed
    12. z-index 定位高度
    13. overflow 布局
    14. 伪类 :hover,:after,:before
  • 相关阅读:
    jar-下载站点
    java-原生爬虫机制源码
    eclipse-插件安装的三种方式
    ivy,ivyde插件-eclipse
    cygwin-介绍-安装
    cygwin-使用介绍
    linux-命令全集
    jquery-遍历each
    SSD固态硬盘的闪存芯片颗粒介绍
    java-测试synchronized使用xxx.class和this使用的区别
  • 原文地址:https://www.cnblogs.com/pengdt/p/12037492.html
Copyright © 2011-2022 走看看