2016-06-13 3 views
1

나는 Shay Howe 씨가 작성한 코드 작성 : HTML 및 CSS에서 코드를 작성하여 코드에 문제가 발생했습니다.CSS 구문 분석 오류 란 무엇이며 어떻게 수정합니까?

어도비의 텍스트 편집기로 브래킷을 사용하고 실시간 미리보기를 보면 모양이 보이지 않아서 W3C CSS 유효성 검사 서비스에 넣었으며 구문 분석 오류. 여기에 내 코드 (문제 영역)입니다 :

h1, h3, h4, h5, p { 
margin-bottom: 22px; 
} 

<a class="btn-alt"></a> 

/* 
============================================== 
Buttons 
============================================== 
*/ 

.btn { 
border-radius: 5px; 
display: inline-block; 
margin; 0; 
} 

.btn-alt { 
border: 1px solid #dfe2e5; 
padding: 10px 30px; 
} 

그리고 내 HTML :

<a class="btn-alt"></a> 

내가 돈 '

<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="utf-8"> 
    <title>Styles Conference</title> 
    <link rel="stylesheet" href="assets/stylesheets/stylesconference.css"> 
</head> 

<header> 
<section class="container"> 
<h1> 
<a href="stylesconference.html">Styles Conference</a> 
</h1> 
</section> 
<h3>August 24&mdash;26th &mdash; Chicago, IL</h3> 
<nav> 
<a href="stylesconference.html">Home</a> 
<a href="speakers.html">Speakers</a> 
<a href="schedule.html">Schedule</a> 
<a href="venue.html">Venue</a> 
<a href="register.html">Register</a> 
</nav> 
</header> 
<header class="container"></header> 

<section> 
<h2>Dedicated to the Craft of Building Websites</h2> 
<p>Every year, the brightest web designers and front-end developers descend on Chicago to discuss the latest technologies. Join us this August!</p> 
<a href="register.html">Register Now</a> 
</section> 
<section class="hero container"></section> 

<section> 

<section> 
<a href="speakers.html"> 
    <h5>Speakers</h5> 
    <h3>World-Class Speakers</h3> 
</a> 
    <p>Joining us from around the world are over twenty fantastic speakers, here to share their stories.</p> 
</section> 
<section class="container"></section> 

<section> 
<a href="schedule.html"> 
    <h5>Schedule</h5> 
    <h3>Three Inspiring Days</h3> 
</a> 
    <p>Enjoy three inspiring and action-packed days of talks, gatherings, and all-around good times.</p> 
</section> 

<section> 
<a href="venue.html"> 
    <h5>Venue</h5> 
    <h3>The Chicago Theatre</h3> 
</a> 
    <p> Within the heart of downtown Chicago, The Chicago Theatre will provide a beautiful conference venue.</p>  
</section> 

</section> 
<section class="container"></section> 

<footer> 
    <small>&copy; Styles Conference</small> 
     <nav> 
     <a href="stylesconference.html">Home</a> 
     <a href="speakers.html">Speakers</a> 
     <a href="schedule.html">Schedule</a> 
     <a href="venue.html">Venue</a> 
     <a href="register.html">Register</a> 
     </nav> 
</footer> 
<footer class="container"></footer> 
</html> 
+2

"웨이터, 내 수프에 머리카락이 있습니다"와 동일합니다. –

+0

[Complete, Minimal, Verifiable Example] (http://stackoverflow.com/help/mcve)을 작성하십시오. –

답변

3

CSS 파일의 라인 5에서 HTML 태그가있다 실제 코드의 오타 또는 여기 게시 한 결과인지는 알 수 없지만 이는 문제입니다.

는 라인 (16)에 콜론해야한다 세미콜론의 .btn 클래스의 마지막 스타일도 있습니다 :

margin; 0; 

이 될해야합니다

margin: 0; 
0

그냥 태그를 제거가 <a class="btn-alt"></a> 그리고 작동 할 수도 있습니다

관련 문제