2014-09-07 2 views
1

Bootstrap에 새로운 기능이 추가되어서 방금 놀았습니다. 그러나 내가 일을 할 수없는 한 가지가있다. 그리고 이것은 점보트론에서 h1 태그의 색을 변경합니다.Bootstrap의 h1 색상 변경 Jumbotron

HTML 코드 :

<!DOCTYPE html> 
<html> 
<head> 
    <title>Hello WWW</title> 
    <link rel="stylesheet" href="main.css"> 

    <!-- Latest compiled and minified CSS --> 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> 
</head> 

<body> 
    <div class="jumbotron"> 
     <h1>Progression of Connected Computing</h1> 
     <p>Learn more about the internet</p> 
    </div> 
</body> 
</html> 

main.css가 코드 :

.jumbotron h1{ 
    color: #fff; 
} 

.jumbotron p{ 
    color: #fff; 
} 

문제는 P 태그가 올바르게 변경과 흰색 설정하지만, 어떤 이유로 H1 태그는 안된다됩니다 ? 아마 뭔가 바보 같은 짓을하고 있지만 그게 뭔지 알 수는없는 것 같습니다. 감사!

답변

4

bootstrap 스타일을 사용자 지정 main.css 스타일로 다시 정의하려면 bootstrap.css을 포함시킨 후 사용자 지정 main.css 파일을 포함시켜야합니다.

+2

아, 나는 바보 같은 느낌입니다. 감사합니다 / – Ethan

1

사용자 정의 CSS 파일은 bootstrap.min.css 이후에 배치해야하므로 무시할 수 있습니다. 이처럼

- 내가 그렇게 할 수있는 쉬운 방법을 발견

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> 
<link rel="stylesheet" href="main.css"> 
2

: 단지 예를 스팬 블로그에 대한 내부 H1 블로그를 포장을; 그런 다음 스팬 블로그에 부트 스트랩을 적용하십시오. 예를 들면 다음과 같습니다.

<span class="text-success"><h1>Hello World</h1></span>