shape-image-threshold: value; object.style.shapeImageThreshold = "value"; <'shape-image-threshold'> = <alpha-value> <alpha-value> = <number> | <percentage> <number> An integer or zero or more decimal digits followed by a dot (.) followed by one or more decimal digits. The first character may be preceded by a sign (- or +). The last character may be succeeded by an exponent (e or E) and an integer.
<percentage> Specifies the percentage using a number followed by a percent sign (%).
<!doctype html>
<html>
<head>
<style>
.myclass
{
background-image: linear-gradient(135deg, yellow, transparent);
float: left;
height: 100px;
shape-image-threshold: 25%;
shape-outside: linear-gradient(135deg, yellow, transparent);
width: 100px;
}
</style>
</head>
<body>
<div class="myclass"></div>
<p>percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage percentage</p>
</body>
</html>
<!doctype html>
<html>
<head>
<style>
.myclass
{
background-image: linear-gradient(135deg, yellow, transparent);
float: left;
height: 100px;
shape-outside: linear-gradient(135deg, yellow, transparent);
width: 100px;
}
</style>
</head>
<body>
<button>initial</button>
<button value="0.5">number</button>
<button value="25%">percentage</button><br>
<div class="myclass"></div>
<p>shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold shape-image-threshold</p>
<script>
function myfunction(myparameter)
{
const mytarget = myparameter.target;
const myproperty = mytarget.value || mytarget.innerHTML;
document.querySelector(".myclass").style.shapeImageThreshold = myproperty;
}
for(const mybutton of document.querySelectorAll("button"))
{
mybutton.addEventListener("mouseover", myfunction);
}
</script>
</body>
</html>