다음은 가장 간단한 html 문서입니다. h1
스타일로 margin-top
을 지정합니다. 문서는 다음과 같습니다.margin-top이 작동하지 않습니다.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Free mind!</title>
<style type="text/css">
p {
font-family : DejaVu Sans Mono;
font-size : 12pt;
line-height : 100%;
margin-top : 0cm;
margin-bottom : 0.3cm;
white-space : pre-wrap;
display : inline;
}
h1 {
font-size : 14pt;
line-height : 100%;
margin-top : 1cm;
display : inline;
color : blue ;
}
</style>
</head>
<body>
<h1>Bio</h1>
<p>
bk-simulates-range.py -S "" -b "" -e "" -s "" -t dspc.top -n 3000000 -c -j bk-runs-mpi.bash -w "-4.5.5-double_gcc" 2&> `date +%Y-%b-%d-%H%M%S`.log &
bk-pymol-selects.py -f confout.gro -s "resi 1-128" -t traj.trr -i 50
bk-pymol-selects.py -f *ane.gro
bk-pymol-pic.py -f confout.gro -s "resi 1-128" -x "-2" -y "-3" -z "0" -t traj.trr
</p>
<h1>Bash</h1>
<p>
cd /new/dir; (cd /old/dir; find -type d ! -name .) | xargs mkdir
for i in `ls`; do $i; done
</p>
</body>
</html>
저는이 질문에 매우 간단해야합니다.
편집 :
그래서 문제가 있었다 다음h1
사양
display : block;
. 내가 사용하여 종료 (여기에 내가 head
인용과 body
- 다른 부분은 변경이 필요하지 않습니다) : - cm
과 pt
좋은 없습니다
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Free mind!</title>
<style type="text/css">
p {
font-family : DejaVu Sans Mono;
font-size : 12pt;
line-height : 100%;
margin-top : 0px;
margin-bottom : 0px;
white-space : pre-wrap;
display : inline;
}
h1 {
font-size : 14pt;
line-height : 100%;
margin-top : 20px;
margin-bottom : -1px;
display : block;
color : blue ;
}
</style>
</head>
<body>
<h1>Bio</h1>
<p>bk-simulates-range.py -S "" -b "" -e "" -s "" -t dspc.top -n 3000000 -c -j bk-runs-mpi.bash -w "-4.5.5-double_gcc" 2&> `date +%Y-%b-%d-%H%M%S`.log &
bk-pymol-selects.py -f confout.gro -s "resi 1-128" -t traj.trr -i 50
bk-pymol-selects.py -f *ane.gro
bk-pymol-pic.py -f confout.gro -s "resi 1-128" -x "-2" -y "-3" -z "0" -t traj.trr</p>
<h1>Bash</h1>
<p>cd /new/dir; (cd /old/dir; find -type d ! -name .) | xargs mkdir
for i in `ls`; do $i; done</p>
</body>
또한
명이 em
및 px
대신 cm
및 pt
사용해야합니다 말을 웹용.
무엇이 잘못 되었나요? – paulmorriss
@paulmorriss : 오 - 미안 해요. 위 코드의 'h1'의 여백은 잘못되었습니다. 그것은 사양에 따라야하므로 '1cm'이 아닙니다. 여기 – Adobe