gpt4 book ai didi

CSS 选择器未选择 h1 元素

转载 作者:行者123 更新时间:2023-11-28 15:10:27 25 4
gpt4 key购买 nike

我将包含完整的代码,因为我不确定问题出在哪里,但我试图定位的元素是 <h1>PC Lee</h1> ,我正在尝试将字体颜色更改为白色,但它不起作用:

{% extends 'core/base.html' %}
{% load static %}

{% block head %}
<link rel="stylesheet" type="text/css" href="{% static 'core/style/index2.css' %}" />

<!--links specific to style sheet 2 -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300" rel="stylesheet">{% endblock %}

{% block body %}


<div id="jumbotron">

<ul>
<li class="align_left"><a href="#">PCLee</a></li>
<li class="align_right"><a href="#">Repairs/Upgrades</a></li>
<li class="align_right"><a href="#">Networking</a></li>
<li class="align_right"><a href="#">Remote Backups</a></li>
<li class="align_right"><a href="#">Data Recovery</a></li>

</ul>

<div id="h1_div"><h1>PC Lee</h1>
<img id="image" src="{% static "core/images/logo.png" %}" alt="My image" height="400" width="200"/>
</div>

</div>
<h1>dafs</h1>

<div id="grid">
<div id="content">
<h1>About Us</h1>
<img src="{% static "core/images/first_img.jpeg" %}" alt="My image"/>
<p>PCLee Computer has been dedicated to providing outstanding technical support to the New York Tri-State area for over 10 years. Specializing in computer sales, repair services, and networking. We have grown our business with individualized attention, honest diagnosis and fast turn-around. PCLee Computer prides itself on customer satisfaction. </p>
<p>Our technicians can assist your home or office computer repairs, computer setup, software and operating system upgrades, internet connection problems, wireless networking, peripherals (cameras, scanners, printers, iPods,), spyware and virus removal, and all other frustrating computer problems.</p>
</div>

<div id="contact_form">
<h2>Contact Us</h2>
<form role="form" action="" method="post">
{% csrf_token %}
<p>Full Name: <input type="text"></p>
<p>Email:<input type="text"></p>
Inquiry:<textarea></textarea>
<button type="submit">Submit</button>
</form>
</div>
</div>


{% endblock %}

和CSS:

h1{
font-family: 'Open Sans Condensed', sans-serif;
color: white !important;
font-size: 1em;
}

这些 css 语句都不会影响 h1元素,但 css 文件已正确链接,因为所有其他 css 语句都在工作。感谢您的帮助

最佳答案

你试过吗

  #h1_div h1 {
color: white;
}

关于CSS 选择器未选择 h1 元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51660761/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com