佘小宝的爹 发表于 2018-12-15 09:08:43

php课程的第三天

  今天是学习php课程的第三天,今天主要是学习列表有关的知识。

  首先是定义。有序列表ol,无序列表ul。有序列表会出现如1. 2.之类的标题,无序列表则不会。
  下面用代码来表示。
  

  
  
  
  

  
  
  

  
  滚动
  直播
  
  
  

  调查
  排行
  国际
  
  
  
  

  

  然后我们可以给他加些效果,做成一个横着的小标签栏。其中会用到颜色格式等指令。
  代码如下。
  

  

  
  
  
  

  
  li{
  float: left;list-style: none;background-color: red;font-
  

  size:50px;margin: 2px;height: 50px;line-height: 50px
  }
  ul{
  margin: 0 auto;text-align: center;
  }
  
  
  
  

  
  滚动
  直播
  调查
  排行
  国际
  
  
  
  

  

  这样就会出来一个小的红色导航栏。接下来我们做一个完整的导航栏。
  代码如下。
  

  

  
  
  
  

  
  div{height: 50px;width: 100%;background-color: blue;
  }
  li{
  float: left;list-style: none;margin: 2px;height: 50px;line-
  

  height: 50px;
  text-align: center;
  

  }
  ul{background-color: blue;
  margin: 0 auto;text-align: center;height: 50px;width: 800px;
  }
  li:hover{
  background-color: green;
  }
  

  
  
  
  
  
  滚动
  直播
  调查
  排行
  国际
  
  
  
  
  

  这就是我今天所学的内容,继续加油!
  




页: [1]
查看完整版本: php课程的第三天