Created
February 8, 2012 18:54
-
-
Save h4/1772166 to your computer and use it in GitHub Desktop.
Способы подключения css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- подключение внешнего файла css --> | |
<head> | |
<link href="style.css" rel="stylesheet" type="text/css"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- встроенная таблица стилей --> | |
<head> | |
<style type="text/css"> | |
/* стилевывые правила */ | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- импортироване (устаревший вариант) --> | |
<style type="text/css"> | |
@import url(css/base.css); | |
@import url(css/layout.css); | |
@import url(css/print.css) print; | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- импортирование --> | |
<!-- | |
файловая структура | |
/ | |
|- css | |
|--- base.css | |
|--- layout.css | |
|--- print.css | |
|--- style.css | |
|- index.html | |
--> | |
<!-- в html-файле --> | |
<head> | |
<link href="css/style.css" rel="stylesheet" type="text/css"> | |
</head> | |
<!-- в файле style.css | |
адресация — относительно файла style.css! --> | |
@import url(base.css); | |
@import url(layout.css); | |
@import url(print.css) print; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- подключение файла css с указанием типа устройства отображения --> | |
<head> | |
<link href="style.css" rel="stylesheet" type="text/css" media="all"> | |
<link href="screen-only.css" rel="stylesheet" type="text/css" media="screen"> | |
<link href="print.css" rel="stylesheet" type="text/css" media="print"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- встроенная и внешняя таблица стилей таблица стилей --> | |
<head> | |
<link href="style.css" rel="stylesheet" type="text/css" media="all"> | |
<style type="text/css"> | |
/* стилевывые правила */ | |
</style> | |
<link href="print.css" rel="stylesheet" type="text/css" media="print"> | |
</head> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kakal