最近、自分のドメインにSSL証明書を適用しましたが、HTTP://で自分のWebサイトを表示すると、一部のスタイルに問題があります。スタイルは問題ありません。ただし、HTTPS://で表示する場合、スタイルはまったく適用されません。
私は問題が何であるかを知りました。HTTPSを介してサードパーティのスタイルをロードしていませんでした。HTTPSに切り替えたところ、すべての問題が解決しました。
If the requested URI is https
, if you have resources on the page (images, stylesheets, JavaScript files et. al.) that are requested with the http
scheme some browsers may block them because they are considered insecure. You can circumvent that per-browser, but you also have alternatives in your code:
https
to request everything, or at least match the schems.//
to indicate the scheme. The browser will match the scheme with the request URI. For example: <link rel="stylesheet" type="text/css" href="//example.com/path/to.css">