How to create square and circular images in CSS and Elementor using aspect ratio

Опубликовано: 26 Май 2023
на канале: CSS Express
2,779
31

In this tutorial, you will learn how to put images into a circle or a square using aspect ratio in Elementor and CSS!

This way you can create a circular or a square mask by defining the aspect ratio of 1 (meaning equal sides). Then simply put the object-fit property to cover to keep the image proportions and avoid the stretching or deforming of the image.

If you want to make the image circular, just use border-radius of 50% and you are good to go!

💻 Grab the CSS code here:
https://www.velvetmade.com/2024/02/19...

🚀 Interactive CSS Basics course for designers and non-coders:
https://www.cssgamelab.com/

👉 Get 20% off using the code VELVET20OFF at Checkout.

Circular image masks are popular with portrait and team photos, avatars etc.

––––––––––––––––––––––––––––––

PURCHASE AND DOWNLOAD ELEMENTOR PRO:

https://trk.elementor.com/cssexpress

––––––––––––––––––––––––––––––

SIMPLE CUSTOM CSS AND JS PLUGIN:

To use custom CSS code with Elementor FREE, I am using the Simple Custom CSS and JS plugin for Wordpress that you can download here:

https://wordpress.org/plugins/custom-...

Have fun and thanks for watching!

If this tutorial helped you, please share or subscribe.

––––––––––––––––––––––––––––––

This video and description may contain affiliate links. If you click on a link and make a purchase, I will receive a commission from the sale. That way you are supporting my channel and allowing me to keep making videos and posts like this. I only promote products that I use, have experience with and support, such as Elementor Pro.

––––––––––––––––––––––––––––––

Have a specific problem in Elementor that you don't know how to solve with CSS? Comment below to let me know which video you would like to see next!

––––––––––––––––––––––––––––––

MUSIC:Artist: Corbyn Kites Track Title: Staycation

––––––––––––––––––––––––––––––


Смотрите видео How to create square and circular images in CSS and Elementor using aspect ratio онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал CSS Express 26 Май 2023. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 2,779 раз и оно понравилось 31 посетителям.