Font Awesome не отображает значокHtml

Программисты Html
Ответить
Anonymous
 Font Awesome не отображает значок

Сообщение Anonymous »

Я работаю над простого приложения Flask, которое отдает HTML -страницу с Awesome иконами Font. Я включил Font Awesome CDN в, и, хотя стили фона и макет появляются правильно, сами значки не отображаются - только цвет фона видна. /> вот мой код: < /p>
from flask import Flask, render_template_string, url_for

app = Flask(__name__)

@app.route('/')
def home():
html = '''





Radiology IT Request


body {
background-color: #000100;
font-family: Arial, sans-serif;
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
color: white;
padding-top: 70px;
box-sizing: border-box;
}

.tab-header {
background-color: #454545;
position: fixed;
top: 0;
width: 100%;
z-index: 1000;
display: flex;
flex-wrap: wrap;
align-items: center;
padding: 10px 20px;
gap: 15px;
}

.tab-header img {
height: 45px;
width: auto;
margin-right: 10px;
}

.tab-header a {
color: gray;
text-decoration: none;
font-size: 16px;
padding: 6px 10px;
border-radius: 4px;
transition: background-color 0.3s ease;
}

.tab-header a:hover {
background-color: #ddd;
color: black;
}

.tab-header-Icon {
position: fixed;
top: 20px;
right: 20px;
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
width: 50px;
height: 50px;
border-radius: 50%;
background-color: #454545;
text-decoration: none;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.tab-header-Icon i {
font-size: 30px;
color: #00bfff;
}

.box {
background-color: white;
padding: 30px;
width: 90%;
max-width: 350px;
border: 2px solid #007BFF;
border-radius: 10px;
color: #000;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
text-align: center;
}

h1 {
color: #007BFF;
}





Home
Activities
Requests
Solutions
Maintenance
Reports





Please Submit Your IT Request
Thank you for your submission!



'''
return render_template_string(html)

if __name__ == '__main__':
app.run(debug=True)



Подробнее здесь: https://stackoverflow.com/questions/796 ... g-the-icon
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Html»