+ -
当前位置:首页 → 问答吧 → 我在用PHP写一个网站,怎样让标题文字重叠?

我在用PHP写一个网站,怎样让标题文字重叠?

时间:2011-07-29

来源:互联网

用CSS做可以么?我是新手,不知道该怎么做。网页上有两个标题,一个是很大的字的主标题,在副标题的下面,就是衬托着副标题。

作者: imyangmo   发布时间: 2011-07-29

HTML code
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style>
h1{font-size:44px; color:#CCC; position:absolute; left:10px; top:10px;}
h2{font-size:28px; color:#000; position:absolute; left:10px; top:20px; z-index:1;}
</style>
</head>
<body>
    <div style="position:relative;">
        <h1>主标题</h1>
        <h2>很长的副标题很长的副标题</h2>
    </div>

</body>
</html>

作者: MuBeiBei   发布时间: 2011-07-29

热门下载

更多