diff options
Diffstat (limited to 'files/pl/web/api/cssnumericvalue/div/index.html')
-rw-r--r-- | files/pl/web/api/cssnumericvalue/div/index.html | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/files/pl/web/api/cssnumericvalue/div/index.html b/files/pl/web/api/cssnumericvalue/div/index.html new file mode 100644 index 0000000000..cd74042e3e --- /dev/null +++ b/files/pl/web/api/cssnumericvalue/div/index.html @@ -0,0 +1,59 @@ +--- +title: CSSNumericValue.div() +slug: Web/API/CSSNumericValue/div +translation_of: Web/API/CSSNumericValue/div +--- +<div>{{draft}}{{APIRef("CSS Typed OM")}}{{SeeCompatTable}}</div> + +<p class="summary">The <strong><code>div()</code></strong> method of the {{domxref("CSSNumericValue")}} interface divides the <code>CSSNumericValue</code> by the supplied value.</p> + +<h2 id="Syntax">Syntax</h2> + +<pre class="syntaxbox">var cssNumericValue = CSSNumericValue.div(<em>number</em>);</pre> + +<h3 id="Parameters">Parameters</h3> + +<dl> + <dt>number</dt> + <dd>Either a {{jsxref('Number')}} or a {{domxref('CSSNumericValue')}}.</dd> +</dl> + +<h3 id="Return_value">Return value</h3> + +<p>A {{domxref('CSSMathProduct')}}.</p> + +<h3 id="Exceptions">Exceptions</h3> + +<dl> + <dt>TypeError</dt> + <dd>Indicates that an invalid type was passed to the method.</dd> +</dl> + +<h2 id="Examples">Examples</h2> + +<pre class="brush: js">let mathProduct = CSS.px("24").div(CSS.percent("4")); +// Prints "calc(24px / 4%)" +mathProduct.toString();</pre> + +<h2 id="Specifications">Specifications</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('CSS Typed OM','#dom-cssnumericvalue-div','div')}}</td> + <td>{{Spec2('CSS Typed OM')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility">Browser compatibility</h2> + + + +<p>{{Compat("api.CSSNumericValue.div")}}</p> |