在图像上标题文本 [英] Header Text over Image

查看:119
本文介绍了在图像上标题文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要我的标题文字(活动,博客,关于)到Images / Damask.png图像的LAY ON TOP。相反,图像显示在标题的最顶部,文本位于图像的下方。

I want my Header text (Events, Blog, About) to LAY ON TOP OF the "Images/Damask.png" image. Instead the image is displayed at the very top of the header with the text BELOW the image.

<header>

    <header>
    <img src="Images/Damask.png" width="100%" border="0" height="200" class="header">
        <a href="index.html" id= "logo">![enter image description here][1]
            <h1>J Barnes Events</h1>
            <h2>Indianapolis's Finest<h2>   
        </a>
        <nav>
            <ul>
                <li><a href="index.html" class="selected">Events</a></li>
                <li><a href="about.html">Blog</a></li>
                <li><a href="contact.html">About</a></li>
            </ul>
        </nav>
</header>


推荐答案

在你的样式表中使用下面的CSS,并实现你想要做的:

Instead of separately adding an image, you can simply add the following CSS to your stylesheet and that would achieve what you're trying to do:

header {
     background-image: url('Images/Damask.png');
}

这篇关于在图像上标题文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆