html布局帮手 php,html布局:html三列布局的实现代码

本文介绍了一种HTML三列布局的方法,其中左右两列自适应宽度,中间列固定宽度。通过CSS样式实现,适用于多种网页设计场景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

本篇文章给大家带来的内容是关于html布局:html三列布局的实现代码,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。

主要是记录一个完整的布局样式,实现页面大致三列其中左右两列是自适应宽度,中间固定宽度效果。

CSS样式代码:/********************

*公共标签样式

********************//*********************

*main 外边框自适应区域

***********************/.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;

}/*********************

*头部文号区:70px

***********************/.content_title {

width: 100%;

margin: 0 auto;

text-align: center;

height: 30px;

padding-top: 20px;

padding-bottom: 20px;

line-height: 30px;

}/**********************

*区域块设置

**********************/.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底部区域

***************************/.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;

}

三列布局

名称/文号:

左边
中间
右边

最终效果展示:

3ff0f032d318d5d1d44c080cb32cc928.png

相关文章推荐:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值