你如何在LESS中写下这种风格?
public IActionResult MyContactInfo([ModelBinder(BinderType = typeof(Binders.TrimModelBinder), Name = "TrimModelBinder")] MyAccountModel mam)
{
//...
}
我的尝试:
nav a:hover,
nav a:focus,
footer a:hover,
footer a:focus,
.fullscreen-container a:hover,
.fullscreen-container a:focus {
text-decoration: none;
}
结果:
{{2} }理想的结果:
.text-decoration-none () {
text-decoration: none;
}
nav a {
&:focus,
&:focus {
.text-decoration-none ();
}
}
footer a {
&:focus,
&:focus {
.text-decoration-none ();
}
}
.fullscreen-container a {
&:focus,
&:focus {
.text-decoration-none ();
}
}
任何想法?
答案 0 :(得分:6)
nav, footer, .fullscreen-container {
a {
&:hover, &:focus {
text-decoration: none;
}
}
}
答案 1 :(得分:1)
.text-decoration-none () {
text-decoration: none;
}
nav a, footer a, .fullscreen-container a {
&:hover,
&:focus {
.text-decoration-none ();
}
}