4-3编程练习 老师请看看代码有没有哪里可以优化的

来源:4-3 编程练习

慕圣4552005

2017-12-13 19:38:43

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

<title>A</title>

<style>

   *{

       margin:0;

       padding:0;

       font-family:"微软雅黑";

       color:white;

   }

   img{

       width:99%;

   }

   .left{

       width:160px;

       height:200px;

       background:rgb(229,46,84);

       position:fixed;

       top:50%;

       margin-top:-100px;

   }

   .right{

       width:160px;

       height:200px;

       background:rgb(45,165,202);

       position:fixed;

       top:50%;

       margin-top:-100px;

       right:0;

   }

   .text{

       margin-top:10px;

       margin-left:10px;

       line-height:2em;

   }

        .job{

            margin-top:20px;

            margin-left:10px;

            border-bottom:1px solid white;

            width:120px;

            padding-bottom:10px;

            font-size:24px;

        }

        .enter{

            padding:10px;

            font-size:13px;

            cursor:pointer;

        }

</style>

</head>

<body>

<div>

   <img src="http://climg.mukewang.com/59c9f7ce0001839219034033.png">

   <div class="left">

       <div class="job">

           <p>Web</p>

           <p>前端工程师</p>

       </div>

       <div class="enter">

           <p>职业路径 ></p>

       </div>

   </div>

   <div class="right">

       <div class="job">

           <p>Java</p>

           <p>工程师</p>

      </div>

      <div class="enter">

           <p>职业路径 ></p>

       </div>

   </div>

</div>

</body>

</html>


写回答

2回答

慕虎8092331

2017-12-30

同学,请问你的.text并没有设置class,是怎么来的

0

好帮手慕糖

2017-12-14

你好,实现的效果没有问题,不过有一点,css中的.text选择器,在HTMl中并没有对应的类,建议:认真检查下代码哦。

祝学习愉快~

0

0 学习 · 36712 问题

查看课程