[英]What am I doing wrong with my HTML/CSS3?
我正在嘗試使background-size屬性正常工作,但是-我認為我的CSS出現問題,導致它一開始無法正常工作。 我需要弄清楚CSS圖像應如何顯示-並且一旦它顯示出來-我希望能夠在其上書寫文本。 這里有什么幫助嗎?
<html>
<head>
<title>The Lord of the Rings</title>
<style>
h3.start{color: #8391E1; background-color: #black;, border: 1px; font-size: 100px; float: left font-size: 20px; box-shadow: 2px 2px; line-height: 200px;}
p {color: #DD8797; font-size: 32px; line-height: 200%; padding: 5px; width: 300; padding: 10px 0 px 0 px 10px; float: left; margin: 0px 0px 0px 0px; width: 500px; margin: 5px; display: inline; transform:scale(1,1); behavior: url(ie-css3.htc); :scale(3,1); z-index:100; left: 250px; top: 350px;}}
p.ex{height: 200px; width: 200px;}
p.test{width: 700px; height: 300px;
border: 1px dashed #000000;
word-break: break-all;}
#image {
background:url(https://caronedmunds.files.wordpress.com/2008/09/old-paper21.jpg);
background-repeat: no-repeat;
padding:15px;
text-align: left; behavior: url(ie-css3.htc);}
#image2{background-size: 500px 700px;}
#text { position: relative;color:red;font-size:36px;font-weight:bold;}
body {background-color: #87DDA2;}
</style>
</head>
body
<h3 class="start">Lord of the Rings: the Fellowship of the Ring</h3>
<DIV ID="image">
<div id="image 2"> p The Lord of the Rings the Fellowship of the Rings was a great movie. When I was younger I
tried watching it but I wasn't able to get everything that was going on. Coupled with the fact that I didn't know what the Hobbit was, it was clear, that I didn't understand it. That said, I'm a lot older now, and, I'm better able to appreciate it, so, let's see why this film is such a good film shall we? </p>
</div>
</div>
我認為“ #black”無效。 它應該保留“ black”或“#000000”的值。 而且,就像亞歷克斯所說的那樣,您的身材標記已損壞。
首先,您的HTML代碼語法中有很多錯誤:
<body>
,您的<p>
標簽也沒有 他們已在https://css-tricks.com/text-blocks-over-image/上輕松解釋了如何在圖像上書寫文本。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.