gpt4 book ai didi

html - 如何在 CSS 中选择图像的类?

转载 作者:太空宇宙 更新时间:2023-11-04 00:36:06 27 4
gpt4 key购买 nike

我目前有这样的代码:

.icones  {
font-size: 10px;
color: gray;
}
<div class="container-fluid">

<div class="d-flex align-items-center justify-content-between header">

<div class="col-md-4">
<a class="coord" href="">
<img src="{{ asset('build/menu.png') }}"class="icones">Menu</a>
</div>

我目前似乎无法选择图像的 icones 类。我该如何纠正错误?

最佳答案

It is an incorrect property usage on img tag.

You can use the font-size and color on the text HTML elements like H1,H2,H3,H4,H5,H6,P,span and a .... but the img tag is not a text element.

To change the font-size and color of your Menu, you should use the coord class setted on the a tag.

.coord  {
font-size: 40px;
color: gray;
}
<div class="container-fluid">
<div class="d-flex align-items-center justify-content-between header">

<div class="col-md-4">
<a class="coord" href="">
<img src="{{ asset('build/menu.png') }}"class="icones">Menu</a>
</div>
</div>
</div>

关于html - 如何在 CSS 中选择图像的类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59378985/

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