1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<!DOCTYPE html> <style> div { width: 100px; height: 100px; } #outer { background: green; overflow: hidden; } #inner { background: red; transform: translateX(calc(100px)); } </style> <div id="outer"> <div id="inner"> </div> </div>