значения свойства:
* {
margin
:
0
;
padding
}
.
inside
{
width
300px
height
50px
background-color
#7092BE
.a, #div
1
, .b {
900px
100px
10px
auto
border
1px
solid
#808080
.a {
padding-top
* { margin: 0; padding: 0; } .inside { width: 300px; height: 50px; background-color: #7092BE; } .a, #div1, .b { width: 900px; height: 100px; margin: 10px auto; border: 1px solid #808080; } .a { padding-top: 10px; }
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
link
href
"css/style.css"
rel
"stylesheet"
script
type
"text/javascript"
src
"https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"
></
</
body
div
class
"a"
"inside"
id
"div1"
"b"
/*JavaScript*/
document.getElementById("div1").style.paddingTop = "20px";
/*jQuery*/
$(document).ready(function () {
$(".b").css({ "padding-top": "30px" });
});