CSS类及其元素描述 [英] CSS class and their element description

查看:68
本文介绍了CSS类及其元素描述的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢您能否让我知道:
下面我写了一些类,这里的类名有(.),逗号(,)和空格().
这是什么意思?
我将班级名称标记为粗体以引起您的注意.

现在在下面的行中用逗号(,)连字符(-)和空格表示它们的含义:-

Appreciate if u can let me know:
Below I wrote some classes, here class name have (.), Comma(,) and space ( ).
What is the meaning of this?
I have marked class name bold to get ur attention.

Now in below line comma(,) hyphen(-) and spaces are there,what they meant for:-

ul.AspNet-Menu li a, ul.AspNet-Menu li span{
    display: block;
    text-decoration: none;
}







ul.menu ul li
{
position:relative;
border:1px solid #aaa; border-top:none; 
width:148px; margin:0
}





ul.menu ul li a 
{
display:block; 
padding:3px 7px 5px; 
background-color:#d1d1d1
}





ul.menu ul li a:hover
{
background-color:#c5c5c5
}





ul.menu ul ul
{
left:148px; top:-1px
}

推荐答案

这应该有助于对其进行解释: CSS类 [ ^ ]
This should help to explain it: CSS Classes[^]


(.)[Dot]仅适用于该类

示例
(.) [Dot] applicable to that class only

Example
ul.menu

a.highlight



这里的菜单类适用于包含菜单类的元素.

()[空格]适用于指定的元素

示例



Here menu class applies to the elements which contains the menu class.

( ) [Space] applicable to the specified elements

Example

.menu ul table



这里的菜单类别适用于所有ul&表元素.



Here the menu class applies to all ul & table elements.


这篇关于CSS类及其元素描述的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆