Home > Article > Web Front-end > Introduction to the method of making rounded images and oval images with CSS3
This article mainly teaches you the specific implementation code for making rounded images and elliptical images using CSS3. It has a certain reference value. Interested friends can refer to it.
The examples in this article are shared with you. The method of making rounded and oval images with CSS3 is for your reference. The specific content is as follows
1. Rounded images
<!DOCTYPE html> <html> <head> <style> img { border-radius: 8px; } </style> </head> <body> <h2>圆角图片</h2> <p>使用 border-radius 属性来创建圆角图片:</p> <img src="paris.jpg" alt="Paris" width="400" style="max-width:90%"> </body> </html>
2. Oval picture
<!DOCTYPE html> <html> <head> <style> img { border-radius: 50%; } </style> </head> <body> <h2>椭圆形图片</h2> <p>使用 border-radius 属性来创建椭圆形图片:</p> <img src="paris.jpg" alt="Paris" width="400" style="max-width:90%"> </body> </html>
The above is the content of this article All the content, I hope it will be helpful to everyone's learning, and I also hope everyone will support the PHP Chinese website.
For more information on how to create rounded images and oval images with CSS3, please pay attention to the PHP Chinese website!