значения свойства:
.a {
background-color
:
#3BA9DE
;
display
inline
}
#div
1
, .b {
height
50px
width
200px
.b {
: inline-
block
.a { background-color: #3BA9DE; display: inline; } #div1, .b { height: 50px; width: 200px; background-color: #3BA9DE; } .b { display: inline-block; }
<!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"
>Hello World!</
br
"b"
id
"div1"
"c"
/*JavaScript*/
document.getElementById("div1").style.display = "inline-block";
/*jQuery*/
$(document).ready(function () {
$(".c").css({ "display": "block", "height": "100px", "width": "300px", "background-color": "#3BA9DE" });
});