***************************************************************************************************************************************************

先占个坑,html入门两章看我前边的,不再重复。

2019.1.30  css浮动属性

***************************************************************************************************************************************************

一.css浮动属性

css的用来修饰样式的属性之一:

如果两个div排一块

<style>
        .per{
            width: 200px;
            height: 200px;
            background: orange;
            margin:10px ;
        }
</style>


<div class="per"></div>
<div class="per"></div>

这样的话结果是这样的

前端怎么入门 -1

但是,如果加上float

    <style>
        }
        .per{
            width: 200px;
            height: 200px;
            background: orange;
            float: left;
            margin:10px ;
        }
    </style>

前端怎么入门 -1

从左向右一次排列哦,在同一级下

前端怎么入门 -1

相关文章:

  • 2021-11-30
  • 2021-07-30
  • 2021-07-04
  • 2022-01-19
  • 2021-11-01
  • 2021-07-21
  • 2022-12-23
猜你喜欢
  • 2021-10-17
  • 2021-10-13
  • 2022-01-01
  • 2021-04-28
  • 2021-08-18
  • 2021-06-10
相关资源
相似解决方案