2019-10-13 20:16:43 +08:00
# Basic
2019-12-09 12:49:51 +08:00
Affix has `offset-top` , `top` , `offset-bottom` and `bottom` . `offset-top` is top affixing trigger point. `top` is the style `top` value after top affixing is trigger. `offset-bottom` and `bottom` work in similar way.
2019-10-13 20:16:43 +08:00
```html
< div class = "container" >
< div class = "padding" > < / div >
< div class = "content" >
2019-12-06 12:22:10 +08:00
< n-row >
< n-col :span = "12" >
2019-12-09 12:49:51 +08:00
< n-affix :top = "120" :offset-top = "60" > < n-tag > Top 60px< / n-tag > < / n-affix >
2019-12-06 12:22:10 +08:00
< / n-col >
< n-col :span = "12" >
2019-12-09 12:49:51 +08:00
< n-affix :bottom = "120" :offset-bottom = "60" > < n-tag > Bottom 60px< / n-tag > < / n-affix >
2019-12-06 12:22:10 +08:00
< / n-col >
< / n-row >
2019-10-13 20:16:43 +08:00
< / div >
< / div >
```
```css
.container {
width: 100%;
height: 200px;
background-color: rgba(128, 128, 128, .3);
border-radius: 6px;
overflow: auto;
}
.padding {
height: 150px;
width: 100%;
background-color: rgba(128, 128, 128, .15);
}
.content {
height: 600px;
}
```