好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

css position fixed 左右双定位的实现代码

CSS Pos IT ion(定位)
position 属性指定了元素的定位类型。

position 属性的五个值:

@H_ 406 _5@ stat ic relative fixed absolute sticky

元素可以使用的顶部,底部,左侧和右侧属性定位。然而,这些属性无法工作,除非是先设定position属性。他们也有不同的工作方式,这取决于定位方法。

<!DOCTY PE  ht ML >
<html>
	<head>
		< ;m eta charset="utf-8">
		<title></title>
		<style>
			.box{
				width: 1400px;
				h ei ght: 1500px;
				m arg in: 0 auto;
			}
			.box1{
				border: 1px solid  # 000000;
				height: 200px;
				width: 200px;
			    dis play : inline-block;
				position: fixed;
		
			}
			.box02{
				    border: 1px solid #006400;
				    height: 1500px;
				    width: 800px;
				    display: inline-block;
				    mar gin : 0 20px;
				    margin-left: 250px;
			}
			.box03{
				border: 1px solid #006400;
				height: 200px;
				width: 200px;
				display: inline-block;
			    position: fixed;
			}
		</style>
	</head>
	<body>
		<div class="box">
			<div class="box1">123</div>
			<div class="box02">456</div>
			<div class="box03">789</div>
		</div>
	</body>
</html>

到此这篇关于css position fixed 左右双定位的实现代码的 文章 就介绍到这了,更多相关css position fixed定位内容请搜索以前的文章或继续浏览下面的相关文章,希望大家以后多多支持!

总结

以上是 为你收集整理的 css position fixed 左右双定位的实现代码 全部内容,希望文章能够帮你解决 css position fixed 左右双定位的实现代码 所遇到的问题。

如果觉得 网站内容还不错, 推荐好友。

查看更多关于css position fixed 左右双定位的实现代码的详细内容...

  阅读:24次