Home  >  Article  >  WeChat Applet  >  How to add rounded corners to pictures in a small program

How to add rounded corners to pictures in a small program

angryTom
angryTomOriginal
2020-03-25 13:30:298887browse

How to add rounded corners to pictures in a small program

How to add rounded corners to pictures in the mini program

Like CSS, the rounded corners in the mini program can be passedborder-radius to set.

To set a rounded border for a picture, just add the following style:

image{
    border-radius: 5px;
    overflow: hidden;
}

The difference is that in the mini program, you want to set only one of the rounded corners, and the others. For right angles, you need to use border-bottom-left-radius, border-top-left-radius, border-bottom-left-radius, and border-top-left-radius to set them separately.

Use something similar to CSS to write four values ​​directly in the border-radius attribute, such as: border-radius: 5px,0px,0px,5px; It will have no effect

PHP Chinese website , a large number of free small program development tutorials, welcome to learn!

The above is the detailed content of How to add rounded corners to pictures in a small program. For more information, please follow other related articles on 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