zoukankan      html  css  js  c++  java
  • CSS float属性

    The float property sets where an image or a text will appear in another element.
    float属性可设置在另一个元素中的图片或是一段文字在哪出现。

    Note: If there is too little space on a line for the floating element, it will jump down on the next line, and continue until a line has enough space.
    注意:如果在一行空间上的浮动元素过多,超出了空间的容纳范围,它就会自动跳到下一行中,直到一行有足够的空间容纳它。

    Note: Content, background, and borders of inline elements should go in front of the float. Background and borders of a block element should go behind the float, but the content of the block element should go in front of the float.
    注意:在inline元素中的内容,背景以及边框会在浮动层的上面。block元素的背景边框则会在浮动层的下面,而内容会在其上面。

    Inherited: No
    继承性:无

    Example
    举例
    img
    {
    float: left
    }
    Possible Values
    可能用到的值
    Value
    描述
    left
    The image or text moves to the left in the parent element
    图片或是文字移动到父层的左边
    right
    The image or text moves to the right in the parent element
    图片或是文字移动到父层的右边
    none
    The image or the text will be displayed just where it occurs in the text
    图片或是文字回到它本应该出现的位置
  • 相关阅读:
    生命
    历史的分岔-中日产业发展史的对照和思考
    挑战自已
    丰台往事已成风,上下求索永不停
    VC6.0实现鼠标光标形状及大小的定制
    RelativeLayout
    16进制颜色代码
    html里的option错误
    Android用户界面设计:布局基础
    Activity详细介绍【官网】
  • 原文地址:https://www.cnblogs.com/bobo41/p/3043059.html
Copyright © 2011-2022 走看看