1 개요[ | ]
- CSS에서 CSS 인클루드
- 한 CSS 에서 다른 CSS 임포트
- include one css file into another
css
Copy
@import url("CSS파일경로");
2 예시[ | ]
html
Copy
<head>
<style type='text/css'>
@import url("mystyle.css");
</style>
<link rel="stylesheet" href="mystyle.css">
</head>
<body>
<p id='hello1'>안녕하세요.</p>
<p id='hello2'>Hello.</p>
</body>
- mystyle.css
css
Copy
#hello1 {
color: red;
background-color: yellow;
}
#hello2 {
color: green;
}
3 같이 보기[ | ]
4 참고[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.