Home > Web Front-end > CSS Tutorial > Create rounded images and oval images with CSS3

Create rounded images and oval images with CSS3

不言
Release: 2018-06-05 14:21:33
Original
2825 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

XML/HTML CodeCopy content to clipboard

<!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" height="300">
</body>
</html>
Copy after login

##2. Oval image

##XML/ HTML Code

Copy content to clipboard

<!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" height="300">
</body>
</html>
Copy after login

##Related recommendations:

Use pure CSS Example of realizing dynamic text effects


CSS text font color setting method (CSS color)


The above is the detailed content of Create rounded images and oval images with CSS3. For more information, please follow other related articles on 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