CSS :
<title>CSS </title> <style type="text/css"> table.t_example { background-color: #cccccc; width: 400px }.t_example tr { background-color: #ffffff; height: 100px } </style> </head> <body> <table border="0" cellspacing="1" align="center" class="t_example"> <tr> <td> </td><td> </td><td> </td><td> </td> </tr> <tr> <td> </td><td> </td><td> </td><td> </td> </tr> </table> |
, border, background-color: cellspacing="", cellspacing="", .
, .
:
<title> CSS </title> <style type="text/css"> table.t_example { background-color: #999999; width: 600px } .t_example tr { background-color: #ffeeee; height: 150px } </style> </head> <body> <table border="0" cellspacing="3" align="center" class="t_example"> <tr> <td> </td><td> </td><td> </td><td> </td> </tr> <tr> <td> </td><td> </td><td> </td><td> </td> </tr></table> |
, CSS - , . HTML border, () .
CSS border (!) .
.
HTML , CSS .
border-style .
none - ( ).
dotted - .
dashed - .
solid -
double -
groove - ""
ridge - ""
inset -
outset -
:
<html>
|
|
<head>
<title> </title>
<style type="text/css">
p {
background-color: #f5f5f5;
text-align: center;
}
</style>
</head>
<body>
<p style=" border-style: none; "> </p>
<p style=" border-style: dotted; "> </p>
<p style=" border-style: dashed; "> </p>
<p style=" border-style: solid; "> </p>
<p style=" border-style: double; "> </p>
<p style=" border-style: groove; "> ""</p>
<p style=" border-style: ridge; "> ""</p>
<p style=" border-style: inset; "> </p>
<p style=" border-style: outset; "> </p>
</body>
</html>
, , border- style. .
"" , :
: div {border-style: solid;} - . | |
: div {border-style: solid double;} - . - . | |
: div {border-style: solid double dashed;} - . - . - . | |
: div {border-style: solid double dashed ridge;} - . - . - . - . |
.
border-width - .
:
thin -
medium -
thick -
CSS.
, .
: div {border-style: solid; border-width: 1px;} - . | |
: div {border-style: solid; border-width: 1px 4px;} - . - . | |
: div {border-style: solid; border-width: 1px 4px 7px;} - . - . - . | |
: div {border-style: solid; border-width: 1px 4px 7px 5px;} - . - . - . - . |
:
|
|
<html><head>
<title> </title>
</head>
<body>
<div style="border-style: solid; border-width: 3px 1px 10px 4px ">
:
<ul>
<li> 3
<li> 1
<li> 10
<li> 4
</ul>
</div>
<br><br>
<div style="border-style: double; border-width: thick "> </div>
</body>
</html>
.
border-color.
:
#ff0000 - RGB.
red - .
RGB(255,0,0) - RGB.
transparent - .
, "" .
: div {border-style: solid; border-width: 3px; border-color: #008000;} - . | |
: div {border-style: solid; border-width: 3px; border-color: #008000 #0000ff;} - . - . | |
: div {border-style: solid; border-width: 3px; border-color: #008000 #0000ff #ff0000;} - . - . - . | |
: div {border-style: solid; border-width: 3px; border-color: #008000 #0000ff #ff0000 #ffff00;} - . - . - . - . |
.. , : -"CSS " , , .
, :
<html>
<head>
<title> </title>
</head>
<body>
<div style="border-style: solid; border-width: 10px; border-color: #ff0000 #ffff00 #00ff00 #0000ff; ">
<p style="border-style: double; border-width: 5px; border-color: #008000; "></p>
<p style="border-style: double; border-width: 5px; border-color: red; "></p>
<p style="border-style: double; border-width: 5px; border-color: rgb(0,0,255); "></p>
</div>
</body>
</html>