Static website hosting: index.html is accessible but a CSS file has no effect

更新时间:
复制 MD 格式

Problem description

After static website hosting is enabled, the index.html file is accessible, but a linked CSS file, css/xxx.css, is not applied. This setup works correctly in a local environment.

Solution

Troubleshooting steps:

1. Check the network requests for errors.

2. Verify that the CSS file was requested and downloaded.

The issue is caused by the @charset "UTF-8" declaration in the CSS file. Remove this declaration to resolve the issue.

Applicable to

  • EMAS Serverless