blob: 414994b3b2c6e7f1b3c2f80fd4998728c92370e8 [file] [log] [blame]
<!DOCTYPE html>
The perspective origin should be positioned in the container's border box,
regardless of the presence of scrollbars.
.container {
background-color: green;
border: 10px solid black;
overflow: scroll;
position: relative;
width: 100px;
height: 100px;
margin: 10px 0;
perspective: 500px;
.transformed {
background-color: blue;
width: 50px;
height: 50px;
transform: translateZ(-1000px);
<div class="container">
<div class="transformed"></div>
<!-- This blue box should be smaller because it should be obscured by the border. -->
<div class="container" style="perspective-origin: 0 0">
<div class="transformed"></div>
<div class="container" style="perspective-origin: 60% 40px">
<div class="transformed"></div>