主要是記錄一個完整的布局樣式,實現(xiàn)頁面大致三列其中左右兩列是自適應寬度,中間固定寬度效果。
CSSyangshi_10628_1.html' target='_blank'>CSS樣式代碼:
/*********************公共標簽樣式********************//**********************main 外邊框自適應區(qū)域***********************/.main { width: 100%; min-width: 1100px; padding-bottom: 30px; box-sizing: border-box; background-color: #FFF; border-radius: 6px; box-shadow: 0px 4px 6px 0px rgba(70, 95, 106,.25);}/*title 標題 */.main-title { height: 36px; line-height: 36px; text-align: center; font-size: 1em; font-weight: bold; color: #263135; background-color: #d1d6da; border-top-left-radius: 6px; border-top-right-radius: 6px;}/**********************頭部文號區(qū):70px***********************/.content_title { width: 100%; margin: 0 auto; text-align: center; height: 30px; padding-top: 20px; padding-bottom: 20px; line-height: 30px;}/***********************區(qū)域塊設置**********************/.area { height:500px;}.area_left { float: left; width: calc(50% - 75px); height: 100%; background-color: bisque;}.area_center { float: left; width: 150px; height: 100%; background-color: black;}.area_right { float: left; width: calc(50% - 75px); height: 100%; background-color: bisque;}/***************************footer底部區(qū)域 ***************************/.footer { margin: 40px 0;}/* 提交 */.submit { height: 40px;}/* 提交按鈕*/.submit-btn { height: 40px; width: 200px; display: block; margin: 0 auto; border-radius: 5px; color: #fff; text-decoration: none; text-align: center; line-height: 40px; font-size: 1.1em; background-color: #1bbc9b; cursor: pointer;}/*********************公共標簽默認屬性設置********************/body { margin: 0; font-size: 15px; padding: 20px 20px 0 20px; margin-bottom: 0 !important; background-color: #f0f0f0;}input { border: none;}html代碼布局:
@{ Layout = null; !DOCTYPE html html head meta http-equiv= x-ua-compatible content= IE=9 / title 三列布局 /title !--頁面樣式-- link href= ~/Content/css/StyleTemplate/Index.css rel= stylesheet / !--當前頁面的邏輯 -- /head body !-- 主要區(qū)域 -- div >最終效果展示:

相關文章推薦:
div標簽:水平居中和垂直居中的實現(xiàn)(附代碼)
什么是響應式布局?html響應式布局的實現(xiàn)
html布局的常見類型有哪些?html的三種布局特點分析
以上就是html布局:html三列布局的實現(xiàn)代碼的詳細內容,html教程
鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。
新聞熱點
疑難解答