Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何处理大括号标记?_Html_Curly Braces - Fatal编程技术网

Html 如何处理大括号标记?

Html 如何处理大括号标记?,html,curly-braces,Html,Curly Braces,我的问题是: 在css中 table{ position:absolute; top:-100px; left:90px; margin:300px; background-color:#000000; a:link {text-decoration:none;} a:visited {text-decoration:none;} a:hover {background-color:Green;} a:active {tex

我的问题是:

在css中

table{
    position:absolute;
    top:-100px;
    left:90px;
    margin:300px;
    background-color:#000000;
    a:link {text-decoration:none;}
    a:visited {text-decoration:none;}
    a:hover {background-color:Green;}
    a:active {text-decoration:underline;}
}
{
表格旁边的标记被
}关闭
标记底部的
a:link{text decoration:none;}
结尾和
a:link
旁边的左大括号和右大括号变得无用


如何将第一个和最后一个
{
}
标记相互连接?(不使用该
a:link{text decoration:none;}
此行的大括号)

这不是正确的CSS语法。正确答案是:

table{
    position:absolute;
    top:-100px;
    left:90px;
    margin:300px;
    background-color:#000000;
}
table a:link {text-decoration:none;}
table a:visited {text-decoration:none;}
table a:hover {background-color:Green;}
table a:active {text-decoration:underline;}

如果要使用问题中的语法嵌套CSS规则,可以使用编译为CSS的替代样式表语言,如or。

是否确实要将这些a包装到表中的大括号中?上述语法需要编译器。