diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:17 -0500 |
commit | da78a9e329e272dedb2400b79a3bdeebff387d47 (patch) | |
tree | e6ef8aa7c43556f55ddfe031a01cf0a8fa271bfe /files/it/web/css/flex-shrink | |
parent | 1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff) | |
download | translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2 translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip |
initial commit
Diffstat (limited to 'files/it/web/css/flex-shrink')
-rw-r--r-- | files/it/web/css/flex-shrink/index.html | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/files/it/web/css/flex-shrink/index.html b/files/it/web/css/flex-shrink/index.html new file mode 100644 index 0000000000..81cc7cfd51 --- /dev/null +++ b/files/it/web/css/flex-shrink/index.html @@ -0,0 +1,120 @@ +--- +title: flex-shrink +slug: Web/CSS/flex-shrink +tags: + - CSS + - CSS Flex + - Proprietà CSS +translation_of: Web/CSS/flex-shrink +--- +<div>{{CSSRef}}</div> + +<div> </div> + +<p><span class="seoSummary">La proprietà <a href="/en-US/docs/Web/CSS">CSS</a> <strong><code>flex-shrink</code></strong> setta il fattore di restringimento di un elemento flessibile. Se la dimensione di tutti gli elementi flessibili è maggiore del loro contenitore flessibile: gli elementi si restringono per adattarsi secondo il valore impostato di <code>flex-shrink</code>.</span></p> + +<div>{{EmbedInteractiveExample("pages/css/flex-shrink.html")}}</div> + + + +<h2 id="Sintassi">Sintassi</h2> + +<pre class="brush:css no-line-numbers">/* <number> valori */ +flex-shrink: 2; +flex-shrink: 0.6; + +/* Valori globali */ +flex-shrink: inherit; +flex-shrink: initial; +flex-shrink: unset; +</pre> + +<p>La proprietà <code>flex-shrink</code> è specificata come un singolo <code><a href="#<number>"><number></a></code>.</p> + +<h3 id="Valori">Valori</h3> + +<dl> + <dt><a id="<number>" name="<number>"><code><number></code></a></dt> + <dd>Guarda {{cssxref("<number>")}}. Non sono ammessi valori negativi.</dd> +</dl> + +<h3 id="Sintassi_formale">Sintassi formale</h3> + +<pre class="syntaxbox">{{csssyntax}}</pre> + +<h2 id="Esempio">Esempio</h2> + +<h3 id="HTML">HTML</h3> + +<div id="Live_Sample"> +<pre class="brush: html"><p>La larghezza del contenuto è di 500 px; la base flessibile degli articoli flessibili è 120 px.</p> +<p>A, B, C hanno il valore flex-shrink:1 invece D ed E hanno flex-shrink:2 </p> +<p>La larghezza di D ed E è minore delle altre.</p> +<div id="content"> + <div class="box" style="background-color:red;">A</div> + <div class="box" style="background-color:lightblue;">B</div> + <div class="box" style="background-color:yellow;">C</div> + <div class="box1" style="background-color:brown;">D</div> + <div class="box1" style="background-color:lightgreen;">E</div> +</div> +</pre> + +<h3 id="CSS">CSS</h3> + +<pre class="brush: css">#content { + display: flex; + width: 500px; +} + +#content div { + flex-basis: 120px; + border: 3px solid rgba(0,0,0,.2); +} + +.box { + flex-shrink: 1; +} + +.box1 { + flex-shrink: 2; +} +</pre> +</div> + +<h3 id="Result">Result</h3> + +<p>{{EmbedLiveSample('Example', 500, 300)}}</p> + +<h2 id="Specifiche">Specifiche</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Specifiche</th> + <th scope="col">Stato</th> + <th scope="col">Commento</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('CSS3 Flexbox', '#flex-shrink', 'flex-shrink')}}</td> + <td>{{Spec2('CSS3 Flexbox')}}</td> + <td>Definizione iniziale</td> + </tr> + </tbody> +</table> + +<p>{{cssinfo}}</p> + +<h2 id="Compatibilità_dei_browser">Compatibilità dei browser</h2> + +<div class="hidden">The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</div> + +<p>{{Compat("css.properties.flex-shrink")}}</p> + +<h2 id="Guarda_anche">Guarda anche</h2> + +<ul> + <li>CSS Flexbox Guide: <em><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox">Basic Concepts of Flexbox</a></em></li> + <li>CSS Flexbox Guide: <em><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Controlling_Ratios_of_Flex_Items_Along_the_Main_Ax">Controlling Ratios of flex items along the main axis</a></em></li> +</ul> |