<!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"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title> <style type="text/css">/*并列浮动布局,该类型为固定宽度布局。*/ body{ margin:0px; padding-left:180px; padding-right:240px; min-width:480px; /*定义浏览器为最小窗口宽度,该值为第2列 第3列宽度和。*/ } div{ border:1px solid gray; height:40px; } #left{ width:180px; float:left; margin-left:-180px;/*设置偏移宽度为左列宽度,注意取值为负数。*/ } #middle{ width:240px; float:left; } #right{ width:240px; float:left; margin-right:-100%; } </style></head><body> <div id="left">左列</div> <div id="middle">中列</div> <div id="right">右列</div></body></html>
body 中的padding-left=180px,不写的-180px的话,那浏览器不是就看不到从左边开始的吗
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号