左邊選單欄高度設定為100%
<!DOCTYPE html> <html style="height: 100%;"> <head> <meta charset="UTF-8"> <title>首頁</title> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="HandheldFriendly" content="true"> <link rel="stylesheet" type="text/css" href="../public/css/common.css"/> </head> <body style="height: 100%;"> <!--想要此div高度為100%,需把html和body高度同時設定為100%,缺一不可--> <article class="article"> <ul style="height: 100%;"> <li class="home-nav"> <div><a>首頁</a></div> </li> <li class="user-center-nav"> <div><a>使用者中心</a></div> </li> <li class="content-management-nav"> <div><a>內容管理</a></div> </li> <li class="system-management-nav"> <div><a>系統管理</a></div> </li> </ul> </article> </body> </html>