9.26 9.27学习内容总结

        最近讲的html的样式属性有点多,大体记一下,加深一下印象。

      1.loat :浮动     margin:外边框     padding:内边距     background imager :url()插入背景图片    background-repeat: 平铺  no repeat 不平铺  repeat-x   或者-y  往哪个方向平铺

      background-postion:centre中心     background-size:占满   background-attachment:fixed:固定  background:red url() no repeat   (简写)

    2字体font   font-family 字体系列,font-size:字体大小   font-weight:bold 加粗 font-style:italic 文字斜体  text-indent:20px(2em)

空出来多少    text-align:right 水平向右  vertical-align 水平   line-height 行高   border-width  color  style  边框宽度 颜色  实虚线      box-size:border -box 盒子模型(不会撑大)  list-style:none无列表前面的符号

    3< a  href="#"><a>变小手 cursor :pinter 小手    <span></span>有多少内容下多少          < overflow:hidden>   超出隐藏      <overflow:scroll>滚动条   border-radius: 5px  变圆角

老师总结的几个注意事项:(自己也加深一下记忆)

1、外部样式表:<link rel="stylesheet" href="css/index.css">
2、标签的类名(class)可以有多个,多个类名用空格分割,都在引号里面
3、父元素、子元素、同级元素
4、有margin-top的元素是父元素的第一个子元素,那么这个外边距将作用在父元素上。
5、a标签、span标签,默认width和height不起效;
    行内标签,块标签 dispaly: block  inline inline-block
6、设置居中 1、标签 :center   2、样式:margin: 0 auto;
7、内边距和边框会导致元素本身的宽度或高度变化。
    解决方式: 样式:box-sizing: border-box;
8、子元素超出父元素的内容处理方式:overflow:

原文地址:https://www.cnblogs.com/w-xibao/p/7604792.html