1,css代码
css 文字环绕 元素居中 xml
title,author,verse{
display:block;
}
poem{
background-image:url(poem2.jpg);
width:791;height:795;
}
title{
position:absolute;
top:55%;
left:25%;
color:yellow;
font-size:30px;
}
author{
position:absolute;
top:63%;
left:30%;
color:blue;
font-size:20px;
}
verse{
position:absolute;
top:70%;
left:22%;
color:white;
font-size:18px;
}
verse br{
display:list-item;
}
2,xml文件
1,css代码
css 文字环绕 元素居中 xml
title,period,commentary,resume{
text-align:center;
display:block;
}
title{
font-size:30px;
color:blue;
}
period{
font-size:25px;
color:red;
}
summary{
display:block;
font-style:italic;
font-size:25px;
}
resume{
color:purple;
padding:20px;
border-style:solid;
border-bottom-color:green;
border-top-color:green;
border-left-color:orange;
border-right-color:orange;
width:580px;/*让李白显示在下面*/
position:absolute;
left:25%; //居中
}
commentary{
color:brown;
font-style:italic;
font-size:25px;
}
picture{
width:139;height:106;
background-image:url(libai.jpg);
background-repeat:no-repeat;
margin:20px;
/*实现文字环绕*/
float:left;/*浮动到上一元素的左边*/
clear:left;
}
3,xml文件