With the added style margin-left: 50% we have +-+ We have this situation before we add the CSS +-+ If you use relative units, a margin will be calculated as percentage of the width of the parent element, while the transform will be 50% relative to the same element. That would result in zero shift, so what?īut the 50% are not the same, because context is important. Voluptatum.Īt first glance it seems that we shift 50% to the right and then 50% to the left again. Ipsum, aliquid totam repellendus non fugiat id magni voluptate, doloribus tenetur illo mollitia. Excepturi impedit esse modi, porro quibusdam voluptate dolores molestias, sit dolorum veritatis laudantium rem, labore et nobis ratione. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime ad cumque ut atque suscipit enim quidem. Quos exercitationem error nemo amet cum quia eaque alias nihil, similique laboriosam enim expedita fugit neque earum et esse ad, dolores sapiente sit cumque vero odit! Ullam corrupti iure eum similique magnam voluptatum ipsam. * Move to the left by 50% of own width */ * Set left edge of inner element to 50% of the parent element */
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |