问答详情
源自:2-6 编程练习

请问有没有练习题的答案?

有的题不会做,看描述也看不懂,想问问有没有代码答案参考

提问者:默然回首5054 2017-11-06 00:06

个回答

  • wjxjswn
    2017-11-06 17:48:07
    已采纳

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

    <title>无标题文档</title>

    <style type="text/css">


    /*在此定义相应的类选择器,并根据要求设置相关CSS属性*/

    .mainBox{

        width:960px;

        background-color:#cff;

        overflow:hidden;


    }

    .leftBox{

        float:left;

        width:740px;

        height:300px;

        background-color:#c9f;

    }


    .rightBox{

    width: 210px;

    height: 300px;

    background-color:#fcf;

    float: right;

    }



    </style>

    </head>


    <body>


    <div class="mainBox">

    <!--在此添加相应的div标签-->

    <div class="leftBox"></div>

    <div class="rightBox"></div>

    </div>

    </body>

    </html>


  • 夜空太美
    2018-06-08 10:55:33

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

    <title>无标题文档</title>

    <style type="text/css">

    .mainBox{

        /*margin:0 auto;*/

        width:960px;

        height:300px;

        background:blue;

        

    }

    /*在此定义相应的类选择器,并根据要求设置相关CSS属性*/

    .leftBox{

        width:740px;

        height:300px;

        background: red;

        float:left


    }


    .rightBox{

        width:210px;

        height:300px;

        background: yellow;

        float:right;


    }

    </style>

    </head>


    <body>



    <div class="mainBox">

        <div class="leftBox"></div>

        <div class="rightBox"></div>

    </div>




    </body>

    </html>