V
$root
#{$root}
Size: a a a
V
$root
#{$root}
S
$root
#{$root}
S
<style>
.grid {
display: grid;
width: 100%;
height: 30vw;
background: grey;
justify-content: center;
align-content: center;
}
#element {
width: 100px;
height: 100px;
background: gold;
position: relative;
left: -25%;
}
</style>
<div class="grid">
<div id="element">1</div>
</div>
<script>
console.log(getComputedStyle(document.getElementById('element')).left);
</script>
S
<style>
.grid {
display: grid;
width: 100%;
height: 30vw;
background: grey;
justify-content: center;
align-content: center;
}
#element {
width: 100px;
height: 100px;
background: gold;
position: relative;
left: -25%;
}
</style>
<div class="grid">
<div id="element">1</div>
</div>
<script>
console.log(getComputedStyle(document.getElementById('element')).left);
</script>
mБ
mБ
VL
VL
VL
VL
VL
mБ
mБ
mБ
mБ
mБ