相关疑难解决方法(0)

类名中的方括号是什么意思?

我在这里看到了类名中使用的方括号:

<input class="validate[required,custom[onlyLetter],length[0,100]]" name="firstname" type="text" />
Run Code Online (Sandbox Code Playgroud)

这些方括号是什么意思?

html

56
推荐指数
5
解决办法
4万
查看次数

CSS 中的方括号

CSS中方括号之间的东西是什么意思?例如

input[type="radio"]

html css forms

8
推荐指数
2
解决办法
1万
查看次数

媒体查询选择器的元素的多个类有什么问题?或者这里发生了什么?

我一直在试图让荷鲁斯找出我制作的网页的问题,我已经将其范围缩小到与多个类有关,并且我已经做了一个证明。

HTML:

<p class="bg-yellow-on-mobile">
  Should have a yellow background on mobile
</p>
<p class="bg-yellow-on-mobile talign-right-on-mobile">
  Should have a yellow background and text aligned right on mobile
</p>
Run Code Online (Sandbox Code Playgroud)

CSS:

@media (max-width:767px){
  [class="bg-yellow-on-mobile"] { background: yellow; }
  [class="talign-right-on-mobile"] { text-align: right; }
}
Run Code Online (Sandbox Code Playgroud)

小提琴: https: //jsfiddle.net/4w9L16g3/

您将看到移动样式未应用于第二个<p>标签,即具有两个类的标签。是因为它有多个类的原因吗?

html css

2
推荐指数
1
解决办法
8339
查看次数

标签 统计

html ×3

css ×2

forms ×1