Home  >  Article  >  Web Front-end  >  Introduction to the method of making rounded images and oval images with CSS3

Introduction to the method of making rounded images and oval images with CSS3

高洛峰
高洛峰Original
2017-03-07 15:23:072544browse

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>

Introduction to the method of making rounded images and oval images with CSS3

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>

Introduction to the method of making rounded images and oval images with CSS3

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn