Beispiel:CSS-min-1.html

Aus SELFHTML-Wiki
Wechseln zu: Navigation, Suche
<!DOCTYPE html>
<html lang="de">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" media="screen" href="./Beispiel:SELFHTML-Beispiel-Grundlayout.css" />    
<style>
  img {
    width: min(100%, 400px);
    /* padding: min(5vh, 2em) min(5vw, 2em); */
  }


body {
	animation: breite 5s infinite alternate linear;
	border: medium solid;
}

@keyframes breite { 
  from { 
    width: 15em
  } 
  to { 
    width: 50em
  } 
}


</style>
<title>min()-Function</title>
</head>

<body>

<h1>min()-Function</h1>

<img src="http://wiki.selfhtml.org/images/3/31/Hund.gif" alt="Hund">
<p>Die Grafik ist responsiv und nimmt 100% der Containerbreite ein, bis zu einem Maximalwert von 400px.</p>

</body>
</html>