npm install bootstrap --save
이 (가) index.html
에 추가되었지만 스타일이 변경되지 않았습니다. (다른 파일)Boostrap CSS가 작동하지 않습니다.
<link rel="stylesheet"
href="node_modules/bootstrap/dist/css/bootstrap.min.css">
내 코드 :
<button type="submit" class="btn btn-default">Submit</button>
만 나는이 (아래) index.html을 위해 모든 일을 추가하지만 첫 번째 웹의 부하가 매우 느립니다 때
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
업데이트 : (추가 사항)
,536,bootstrap.min.css 파일은 존재하지 않지만 콘솔에서는 찾을 수 없다고 말합니다.
폴더 Strucure : 기본 폴더가 ang2project이며이 된 index.html을 포함 node_modules 폴더와 src 폴더가 안에있다
-angular2_projects
-node_modules
-bootstrap
-dist
-css
bootstrap.min.css
-src
-index.html
파일 경로'node_modules/bootstrap/dist/css/bootstrap.min.css'를 실제로 확인 했습니까? – theblindprophet
이 파일이 있는지 확인하십시오. 콘솔에 오류가 있는지 확인 했습니까? 위 파일이 있는지 확인하여보십시오. – cssGEEK
href가 상대 경로이므로 현재 경로/폴더에서 볼 수 있어야합니다. 당신의 HTML – phuzi