Home > Web Front-end > CSS Tutorial > 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

高洛峰
Release: 2017-03-07 15:23:07
Original
2600 people have browsed it

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>
Copy after login

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template