用DIV+CSS如何?這種表格效果_CSS/HTML

來源:互聯網
上載者:User
表格效果table
<table width="500" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000"> <tr bgcolor="#FFFFFF"> <td height="50" colspan="3"> </td> </tr> <tr bgcolor="#FFFFFF"> <td height="50"> </td> <td height="50"> </td> <td height="50"> </td> </tr> <tr bgcolor="#FFFFFF"> <td height="50"> </td> <td height="50"> </td> <td height="50"> </td> </tr> <tr bgcolor="#FFFFFF"> <td height="50"> </td> <td height="50"> </td> <td height="50"> </td> </tr> </table>
[Ctrl+A 全選 注:如需引入外部Js需重新整理才能執行]
表格效果div+css
<!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"> <style type=text/css> #div1 { width: 450px; border-top: #000 1px solid; border-left: #000 1px solid; } #div1 ul { width: 450px; margin: 0px; } #div1 li { float: left; width: 149px; height: 50px; list-style-type: none; border-right:#000 1px solid; border-bottom: #000 1px solid; text-align: center; line-height: 50px; } </style> <ul> <li style="width: 449px;">1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> <li>7</li> <li>8</li> <li>9</li> <li>10</li> </ul>
[Ctrl+A 全選 注:如需引入外部Js需重新整理才能執行]
  • 相關文章

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.