![]() |
Einbinden von CSS in html |
---|---|
html knowhow | |
Erklärung |
---|
CSS kann man gründsätzlich auf zwei Arten in eine html-Seite einbauen:
1. Meta-tag im head als externe Datei oder per 2. Direkt im head als interne "Datei" |
Quellcode |
1. Als externe Datei
<link rel="stylesheet" href="../scripte/HKH.css"/>
2. oder als interne "Datei" <style type="text/css"> #table {width:120%;} .container {position: relative;width: 100%;left: 0%;} .image {display: block;width: 100%;height: auto;} .overlay {position: absolute;bottom: 100%;left: 0;right: 0;background-color: #008CBA;overflow: hidden;width: 50%;height:0;transition: .5s ease;} .container:hover .overlay {bottom: 0;height: 100%;} .text {color: white;font-size: 20px;position: absolute;top: 50%;left: 50%; -webkit-transform: translate(-50%, -50%);-ms-transform: translate(-50%, -50%);transform: translate(-50%, -50%);text-align: center;} #img8 {width:100%;height:auto;} #table4 {width:300%;border-width:0px;} #p6 {font-size:1.6em} </style> |
|