A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/css/cssom/properties/pixelWidth below:

pixelWidth ยท WebPlatform Docs

pixelWidth Summary

Changes the value of the width without changing the units designator.

Property of css/cssom/propertiescss/cssom/properties

Syntax
var result = element.pixelWidth;
element.pixelWidth = value;
Examples

This example uses a timer to increment the pixelWidth property.

<SCRIPT>
function scaleThis()
{
    if (sphere.style.pixelWidth <900) {
        sphere.style.pixelWidth += 4;
        sphere.style.pixelHeight +=4;
        window.setTimeout("scaleThis();", 1);
    }
}
:
</SCRIPT>

View live example

Notes Remarks

Setting this property changes the value of the width without changing the units designator. Unlike the width property, the pixelWidth value is an integer, not a string, and is always interpreted in pixels.

See also Related pages Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4