Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
382 views
in Technique[技术] by (71.8m points)

html - When I'm trying to add line-height; ?px; it's messing up the page

how can I add scrolling line and don't mess up the "background-color: lightblue;" and Text?

Here's my code.

This one is with out Line-height:;

And the one bellow is with Line-height:;

With out "Line-Height"

With "Line-Height"

body {
    background:url(https://lh3.googleusercontent.com/FublnoqeXmRr-umcsK7k6BigiEm3bnXe7i4ILdUjXmhW795Qm05hXyxJGoPReN54Fif7KW1L8RoOrW9xzIIAxIh_WwOtOLwG-tByGKaOV_htONJ8gBJma1MYGOdlLJ1hlTrGZGwG);
background-size: cover;
}

.heading {
    background-color: lightblue;
    text-align: center;
    position: relative;
    top: -8px;
    right: 50px;
    width: 1160px;

padding: 1px 100px 5px 100px;
}

.heading1 { 
color: black;
font-size: 25px;
 }

 .name {
    font-size: 50px;
 }
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
<div class="heading">
    <p class="heading1">WELCOME TO</p>
    <p class="name">G U L F   S H O R E S</p>


</div>


</body>
</html>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...