CSS实现页面两列布局与三列布局的方法示例
height:50px; } #middle { position:absolute; width:100%; height:auto; top: 100px; bottombottom:50px; } .left { width: 15%; /*这里是百分比或者像素值,对应下面的center就是百分比或者像素值*/ background: red; float: left; height:100%; } .rightright { width: 15%; /*这里是百分比或者像素值,对应下面的center就是百分比或者像素值*/ height: 100%; background: pink; float: rightright; } .center { height: 100%; background: green; /*两种方式均可(一)margin(二)margin-left、margin-right*/ /*(一)、用这种方式上面的left和right中的width是百分比或者像素值都可以*/ margin: auto; /*(二)、这里是百分比或者像素值,对应上面的left、right中的width就是百分比或者像素值*/ /*margin-left:15%; margin-right:15%;*/ } #footer { background: blue; height: 50px; width: 100%; position: absolute; bottombottom: 0; } </style> </head> <body> <form id="form1" runat="server"> <div> <div id="header"> 上 (编辑:焦作站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |