我开始使用BEM方法[BLOCK,ELEMENT,MODIFIER],我对它有疑问.
在一个名为"参与"的部分中,我有一个表单,所以:
<section class="participate">
<form class="participate__form">
<label for="name" class="participate__form__label"></label>
<input type="text" id="name" name="participate__form__input"/>
</form>
</section>
Run Code Online (Sandbox Code Playgroud)
而CSS:
.participate {
&__form {
// css here
}
&__form__label {
// css here
}
&__form__input {
// css here
}
}
Run Code Online (Sandbox Code Playgroud)
表格中的类太大了,所以告诉我权利会深入一层:
<section class="participate">
<form class="participate__form form">
<label for="name" class="form__label"></label>
<input type="text" id="name" name="form__input"/>
</form>
</section>
Run Code Online (Sandbox Code Playgroud)
但是我该如何设计呢?
我这样使用它:
.participate {
.form {
// CSS HERE
&__label {
// CSS HERE
}
&__input {
// CSS HERE
}
}
}
Run Code Online (Sandbox Code Playgroud)
但我真的相信这不是正确的做法.拜托,有人可以给我一个灯吗?
我得到了以下数据结构,这是一个帐户对象数组,其中一些帐户是其子帐户的父项,而这些帐户又可以是其他帐户的父项等.
[{
"id": "acc.1260446672222.11",
"type": "EXPENSES_FOLDER",
"name": "Expense Group",
"balance": 3418.11,
"children": [{
"id": "acc.1260446672238.27",
"type": "EXPENSE",
"name": "Advertising, Promotion and Entertainment Account",
"balance": 0,
"children": []
}, {
"id": "acc.9a2492ba-0d82-4f4a-a1b4-14868f1e1a39",
"type": "EXPENSES_FOLDER",
"name": "Premises Costs",
"balance": 0,
"children": [{
"id": "acc.287ba5b6-5536-428b-950f-d71d2af73ccc",
"type": "EXPENSE",
"name": "Use of Home - Gas",
"balance": 0,
"children": [
]
}, {
"id": "acc.7091ee15-3f02-4bd1-94e5-5918cf986969",
"type": "EXPENSE",
"name": "Hire of Venue, Studios, Teaching Rooms",
"balance": 0,
"children": [
]
}]
}, {
"id": "acc.827ec446-edeb-4f2b-8032-d306292d2d83",
"type": "EXPENSES_FOLDER", …Run Code Online (Sandbox Code Playgroud) 我想弄清楚,如何创建 ie 名称的 javascript 数组。从今天开始的最后 7 天。
我知道 getDay() 将返回一天中的一个数字,然后我可以将其用作索引来访问包含星期几的数组元素。
这将为我提供今天的名称,但我需要按时间顺序返回以创建最近几天的数组,我在网络上找不到与此问题类似的任何内容。
任何优雅的解决方案?也许是jQuery?
我可以在链接后面制作图标,但不能再点击它了.
我已经用过了z-index房产.但我没有运气.
有人可以帮助我,找到一个图标在链接后面的方式和链接仍然可点击?
PS:我只能在角落点击链接.
这是问题的片段:
.menu-expanded{
background-color: #F16136;
background-image: linear-gradient(transparent 4%, rgba(255, 255, 255, 0.9) 1%);
background-size: 50px 30px;
max-height: 250px;
min-height: 250px;
opacity: 1;
}
.menu-itens{
position:absolute;
padding-left:70px;
}
i{
position: absolute;
opacity: 0.35;
}
ul{
list-style-type:none;
padding: 0px;
margin: 0px;
}
ul li{
text-align: center;
display: block;
}
ul li a{
text-align: center;
display: block;
font-size: 1.0em;
color: #55D;
font-weight: 600;
text-transform: capitalize;
line-height: 1.8em;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all …Run Code Online (Sandbox Code Playgroud)我需要创建Perl代码,允许计算文本文件中的段落.我试过这个并不起作用:
open(READFILE, "<$filename")
or die "could not open file \"$filename\":$!";
$paragraphs = 0;
my($c);
while($c = getc(READFILE))
{
if($C ne"\n")
{
$paragraphs++;
}
}
close(READFILE);
print("Paragraphs: $paragraphs\n");
Run Code Online (Sandbox Code Playgroud)