css中的inset,CSS inset()用法及代码示例

  • Post author:
  • Post category:其他


inset()函数是CSS中的内置函数,与filter属性一起使用以更改图像的插入。

用法:

inset( length | percentage );

参数:此函数接受单个参数长度,该参数长度用于保存应用于图像的对比度级别的值。参数可以是百分比值或长度。它是必填参数。

Example:

CSS | inset() function

div {

float:left;

width:185px;

height:185px;

shape-outside:inset(20%);

}

img {

width:145px;

height:150px;

}

h1,

h4 {

text-align:center;

}

h1 {

color:green;

}

.clr {

color:white;

}

GeeksforGeeks

CSS | inset() function

p

“https://media.geeksforgeeks.org/wp-content/uploads/20190807114330/GFG115.png”

alt=”Sample image”>

How many times- were you frustrated while lookin