<!DOCTYPE html>
<meta charset="utf-8">
<style>
#scroll-container {
overflow: hidden scroll;
width: 400px;
height: 100px;
}
.anchor {
width: 100px;
height: 100px;
background: orange;
display: inline-block;
}
.target {
width: 100px;
height: 100px;
background: green;
}
</style>
<div id="scroll-container">
<div class="anchor">anchor1</div>
<div class="target">target1</div>
</div>