<!DOCTYPE html>
<html>
<head></head>
<body>
<style type="text/css">
body * {display:block;color:blue;}
</style>
</body>
</html>
my code is above, i realy need css
in body
, but in chrome
it looks like this:
what's wrong with my code?
and if I change body * {display:block;color:blue;}
to body input {display:block;color:blue;}
every thing will be ok
--------------------------------------------------------------------------------
I use Java
for web
development, my template engine is freemaker
I define a macro
like this:
<#macro Page >
<!DOCTYPE html>
<html>
<head>
<meta ...>
<link ...>
<tile ...>
<script ..>
</head>
<body>
<#nested>
</body>
</html>
</#macro>
so when I create a page, I can just use
<@Page>
<style>...</style><div...> <--- this will put in to html body
</@Page>
that' why i have to put css
in body