css浮动布局:两个重要属性(float:left)和(clear: both)练习

html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css浮动布局:两个属性(float:left)和(clear: both)弄明白任务完成!title>
    <style>
        #float{
            float:left;
        }
        #float1{
            float:right;
        }
        .jl{
            width:100px;
            height:100px;
            float:left;
        }
        .clearp{
            clear: left;  
        }
        #jl1{
            width: 100px;
            height: 100px;
        }
        div{
            width:500px;
        }
    style>
head>
<body>
    <div>
        <img id="jl1" src="剑灵壁纸.jpg">
        <p>不换行剑灵壁纸美如画p>
        <p>不换行剑灵壁纸美如画p>
        <p>不换行剑灵壁纸美如画p>
    div><br><br><br><br><br>
    <div>
        <img class="jl" src="剑灵壁纸.jpg">
        <p>换行剑灵壁纸美如画p>
        <p>换行剑灵壁纸美如画p>
        <p>换行剑灵壁纸美如画p>
    div><br><br><br><br><br>
    <div>
        <img class="jl" src="剑灵壁纸.jpg">
        <p class="clearp">换行剑灵壁纸美如画p>
        <p class="clearp">换行剑灵壁纸美如画p>
        <p class="clearp">换行剑灵壁纸美如画p>
    div><br><br><br><br>
    <div>正常文字1div>
    <div>正常文字2div>
    <div id="float">浮动文字div>
    <div id="float1">浮动文字div>
    <div>正常文字3div>
    <div>正常文字4div>
   body>`
html>

你可能感兴趣的:(css浮动布局:两个重要属性(float:left)和(clear: both)练习)