我正在处理freeCodeCamp上的一些挑战。具体地说,挑战是在你选择的主题上做一个简短的“致敬页面”。我一直在使用CodePen,但已经开始使用括号,因为它看起来更用户友好。
我的问题是,我的CSS样式在我的独立html文件中没有做任何事情,而在CodePen中它是有效的。我确信我在某个地方犯了一个愚蠢的错误。有什么想法?感谢您的任何建议/帮助!
代码:
<!DOCTYPE html>
<html>
<head>
<style>
.center {
margin: auto;
}
</style>
</head>
<body>
<div class="container">
<div class="jumbotron" style="margin-top:20px" >
<h1 style="color: black" class="text-center">Gord Downie</h1>
<div class="row center">
<img src="http://i.huffpost.com/gen/4541188/thumbs/o-GORD-DOWNIE-TRAGICALLY-HIP-570.jpg?5" class="center">
</div>
<p class="caption text-center"> "He Who Walks Among The Stars" </p>
<p class="text-center"> Gord Downie is a Canadian musician, most well known for his role as the lead singer of the Tragically Hip. More recently in his career, he has also been a spokesperson for the welfare of First Nations communities across Canada. Since 2016, Gord has been battling incurable brain cancer, but has been able to continue writing and performing. As a true artist, Gord has never let fame change him, always maintaining his focus on his music and philanthropy.</p>
<div class="text-center">
<h3 class="text-center"> <strong>Musical Works </strong></h3>
<h5>As a member of the Tragically Hip:</h5>
<ul class="text-center">
<li>The Tragically Hip (Self-Titled) - <em>1987</em></li>
<li>Up To Here - <em>1989</em></li>
<li>Road Apples - <em>1991</em></li>
<li>Fully Completely - <em>1992</em></li>
<li>Day for Night - <em>1994</em></li>
<li>Trouble at the Henhouse - <em>1996</em></li>
<li>Phantom Power - <em>1998</em></li>
<li>Music @ Work - <em>2000</em></li>
<li>In Violet Light - <em>2002</em></li>
<li>In Between Evolution - <em>2004</em></li>
<li>World Container - <em>2006</em></li>
<li>We Are the Same - <em>2009</em></li>
<li>Now for Plan A - <em>2012</em></li>
</ul>
<h5>Solo Work</h5>
<ul>
<li>Coke Machine Glow - <em>2001</em></li>
<li>Battle of the Nudes - <em>2003</em></li>
<li>The Grand Bounce - <em>2010</em></li>
<li>Secret Path - <em>2016</em></li>
</ul>
</div>
</body>
</html>
https://stackoverflow.com/questions/44523765
复制相似问题