div位置的限定:
在实际效果中有时会需要将某一部分内容限定在指定位置,不随滑轮的滚动而滚动:
.title{
background-color:pink;
height:90px;
width:1400px;
margin-top:-8px;
margin-left:-8px;
margin-right:-8px;
position: fixed;
}
在css中添加一个position属性即可。
.title{
background-color:pink;
height:90px;
width:1400px;
margin-top:-8px;
margin-left:-8px;
margin-right:-8px;
position: fixed;
}
在css中添加一个position属性即可。