| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <div class="wrapper">
- <div class="limiter">
- <div class="target"></div>
- </div>
- <div class="source"></div>
- </div>
- <style>
- .wrapper {
- overflow: scroll;
- outline: 1px solid #000;
- height: 400px;
- position: relative;
- padding: 20px;
- margin-top: 100px;
- }
- .limiter {
- height: 500px;
- overflow: hidden;
- }
- .target {
- height: 150px;
- background: #ccc;
- width: 50px;
- margin: 170px auto 0;
- }
- .source {
- height: 50px;
- width: 50px;
- background: red;
- position: absolute;
- }
- </style>
|