发表于: 2016-02-17 18:35:17

1 2073


  今天完成的事情:粗略的把html和css学完了,把九宫格写好了(对比了下同学的有一些差异,有一些css的用法还不太了解),了解了margin,padding还有选择器的基本用法。

  明天计划的事情:1.配置好Nginx。

                             2.让九宫格可以在手机上访问。

  遇到的问题:写代码的时候还是不太熟悉,需要多写加深印象。

  收获:1.对于html还有css有了大概的了解与认识,完成了九宫格。

            2.class选择器的写法要记得加分号,习惯要养成好。


  大概与任务上的图片差不多:

  代码:(学html和css的视频里用的VS写的,我电脑上原先就装了个VS2010所以就将就写了,回头把WebStorm或Sublime下了我再捋一遍代码看看有什么可以改进的地方)

<!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>
    <title>九宫格</title>
    <style type="text/css">
     .scale
     {
      width:350px;
      height:350px;
     }
    .style
    {
        width:100px;
        height:100px;
        background-color:Orange;
        margin:2px;
        float:left;
        border-radius:5px;
    }
    </style>
</head>
<body>
 <div class="scale">
 <div class="style"></div>
 <div class="style"></div>
 <div class="style"></div>
 <div class="style"></div>
 <div class="style"></div>
 <div class="style"></div>
 <div class="style"></div>
 <div class="style"></div>
 <div class="style"></div>
 </div>
</body>
</html>



返回列表 返回列表
评论

    分享到