关于CSS规则的命名问题

来源:百度知道 编辑:UC知道 时间:2024/05/06 01:33:39
在Dreamweaver里面,css规则只能以.开头,且只能包含数字和字母来命名。
但我发现许多css文件都是用#开头的,请问怎样才能用DW做到?

另外,在许多css文件里面,

形如
#head {******}
#head ul{*********}
#head li{********}

的css代码又如何在DW中做到?

不用要可视化,那个很烂的,用那个的换工作都难有人要
另外你说的#那是定义一个ID, .的话是class - 类

切换为代码编辑模式
直接用手写css

新建css规则那里第3个选项,有~~高级(ID,伪类。。。),点那个就可以了!

给你看个例子吧,这就是,在DW代码中,写的,可以直接在DW代码中书写:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
>
</head>
<style type="text/css">
body {
background: #fff;
font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
font-size: 12px;
}

#dlmenu {height:10em;}
#menu {list-style-type:none; margin:0 0 10px; padding:0; position:absolute; width:15em; background:#fff; z-index:100;}
#menu li {display:block; padding:0; margin:0; position:relative; z-index:100;}
#menu li a, #menu li a:visited {display:block; text-decoration:none;}
#menu li dd {display:none;}
#menu li:hover, #menu li a:hover {border:0;}
#menu li:hover dt a , #menu l