我需要做些什么才能将一个imagem放在此代码的标题上方?

时间:2017-07-01 20:59:10

标签: html css html5 css3

我有这个代码,但我无法将图像置于标题上方。 我试过allign / center等,但图片只停留在网页的左边。而且我想把它放在标题上方的中心,所以我需要帮助这个ç-ç如果你们可以帮助我。

<!DOCTYPE html>
<html>
    <head>
        <link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet">
        <title>Teste!</title>

        <style type="text/css">

            * {
                margin: 0;
                padding: 0;
            }
            body {
                font-family: Lobster;
            }
            .background-wrap {
                position: fixed;
                z-index: -1000;
                width: 100%;
                height: 100%;
                overflow: hidden;
                top: 0;
                left: 0;
            }

            #video-bg-elem {
                position: absolute;
                top: 0;
                left: 0;
                min-height: 100%;
                min-width: 100%;
            }
            .content {
                position: absolute;
                width: 100%;
                min-height: 100%;
                z-index: 1000;
                background-color: rgba(0,0,0,0.6);
            }
            .content h1 {
                text-align: center;
                font-size: 65px;
                font-weight: 300;
                color: #fff;
                padding-top: 15%;
                margin-bottom: 10px;
            }
            .content p {
                text-align: center;
                font-size: 20px;
                letter-spacing: 3px;
                color: #aaa;
            }
            .circular {
                width: 300px;
                height: 300px;
                border-radius: 150px;
                -webkit-border-radius: 150px;
                -moz-border-radius: 150px;
                background: url(http://data.whicdn.com/images/246284024/large.jpg) no-repeat;
            }

        </style>


    </head>
    <body>
        <script> alert("Teste site")</script>

        <div class="background-wrap">
            <video id="video-bg-elem" preload="auto" autoplay="true" loop="loop"> 
                <source src="vid/kappa.mp4" type="video/mp4">
                Video not supported
            </video>
        </div>


        <div class="content">
            <img src="">                 
            <h1>Só queria por uma imagem em cima dessa linha.</h1>
            <p>Teste teste teste</p>
        </div>

<div class="circular">

</div>

    </body>
</html>`enter code here`

1 个答案:

答案 0 :(得分:0)

我认为您的意思是以下代码中的ng-click="clearObjectIdModal(button.mode)"标记:

<img/>

如果是这样,你必须给你的图像赋予宽度,然后把它的边距放到auto:

<div class="content">
    <img src="">                 
    <h1>Só queria por uma imagem em cima dessa linha.</h1>
     <p>Teste teste teste</p>
</div>