Pages

Saturday, 26 May 2018

import multiple CSS using single link

CSS file

File A1

.r1
{
       color:red;
}
File A2

.r2
{
       color:green;
}

File A3

.r2

{
       color:blue;
}

Main File

@import url("a1.css");
@import url("a2.css");
@import url("a3.css");


Index File


<html>
<head>
<title>
Include Multiple Css using single link
</title>

<style>
@import 'main.css';
</style>
</head>
<body>
<h1 class="r1">Lorem Ipsum</h1>
<h1 class="r2">Lorem Ipsum</h1>
<h1 class="r3">Lorem Ipsum</h1>
</body>
</html>


Download Source

No comments:

Post a Comment