簡體   English   中英

bootstrap css 未加載到 .ejs 文件中?

[英]bootstrap css is not loading in .ejs file?

我是 ejs 和 Nodejs 的初學者。我有 Nodejs 文件。每當 localhost 遇到 get 請求時。我正在重定向這個index.ejs文件。我正在瀏覽器中獲取數據。但是 css 沒有加載這段代碼中有什么問題.我附上了示例代碼...誰能給我解決方案。提前致謝...

 index.ejs <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <link ref="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"> </head> <body> <div class="container"> <div class="jumbotron text-center"> <h1>User Authentication with Passport,Express4 and MongoDB </h1> <h3>Login or Register with...</h3> <a href="/login" class="btn btn-lg btn-success">Login</a> <a href="/register" class="btn btn-lg btn-info">Register</a> </div> </div> </body> </html>

我用過了:

 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">

它工作正常...

使用 rel="stylesheet" 而不是 ref="stylesheet"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM