aboutsummaryrefslogtreecommitdiff
path: root/files/it/web/css/flex-shrink/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/it/web/css/flex-shrink/index.html')
-rw-r--r--files/it/web/css/flex-shrink/index.html120
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">/* &lt;number&gt; 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="#&lt;number>">&lt;number&gt;</a></code>.</p>
+
+<h3 id="Valori">Valori</h3>
+
+<dl>
+ <dt><a id="&lt;number>" name="&lt;number>"><code>&lt;number&gt;</code></a></dt>
+ <dd>Guarda {{cssxref("&lt;number&gt;")}}. 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">&lt;p&gt;La larghezza del contenuto è di 500 px; la base flessibile degli articoli flessibili è 120 px.&lt;/p&gt;
+&lt;p&gt;A, B, C hanno il valore flex-shrink:1 invece D ed E hanno flex-shrink:2 &lt;/p&gt;
+&lt;p&gt;La larghezza di D ed E è minore delle altre.&lt;/p&gt;
+&lt;div id="content"&gt;
+ &lt;div class="box" style="background-color:red;"&gt;A&lt;/div&gt;
+ &lt;div class="box" style="background-color:lightblue;"&gt;B&lt;/div&gt;
+ &lt;div class="box" style="background-color:yellow;"&gt;C&lt;/div&gt;
+ &lt;div class="box1" style="background-color:brown;"&gt;D&lt;/div&gt;
+ &lt;div class="box1" style="background-color:lightgreen;"&gt;E&lt;/div&gt;
+&lt;/div&gt;
+</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>