当选项数超过20时,我的选择框显示滚动我只想在选项超过10时显示滚动
<select>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
</select>
Run Code Online (Sandbox Code Playgroud) 我正在尝试根据关闭或打开 mat-sidenav 更改 mat-icon 的图标,但无法找到 sidenav 是否打开或关闭,下面是我的代码
<mat-sidenav appResponsiveMenu mode="side" opened>
my menu items list
</mat-sidenav>
Run Code Online (Sandbox Code Playgroud)
这是切换按钮
<button mat-icon-button (click)="sidenav.toggle()">
<mat-icon *ngIf="sidenav">keyboard_arrow_left</mat-icon>
<mat-icon *ngIf="!sidenav">keyboard_arrow_right</mat-icon>
</button>
Run Code Online (Sandbox Code Playgroud)
.ts 代码
@ViewChild(MatSidenav)
sidenav!: MatSidenav;
Run Code Online (Sandbox Code Playgroud) 如何显示div.show何时input.searchtext聚焦?
<div class="select-form-holder">
<input class="searchtext" type="text" value="Find Friends, Movies, T.V shows Games" />
<div class="show-on-focus">xyz</div>
<input type="submit" class="btn-search" title="Search" />
</div>
Run Code Online (Sandbox Code Playgroud) div单击按钮关闭时,我有两个div。第二步div向上,我只想慢慢地做。我尝试使用过渡效果,但不能做任何帮助吗?提前致谢。
小提琴
大家好,我无法在谷歌上找到我的问题的解决方案.我只是想使用图标值来隐藏图像,如下例所示,我只想隐藏图像中具有icon-value ="1"的图像,它具有.box类
<div class="box">
<div class="icon"><img src="xyz/smiley.png" icon-value="1" icon-index="0"></div>
<div class="icon"><img src="xyz/1.png" icon-value="2" icon-index="1"></div>
</div>
Run Code Online (Sandbox Code Playgroud) 我创建了一个函数,可以在单击时添加活动类,其工作正常,但它不会在第一次单击时添加活动类,第二次单击则开始工作正常。这是我的代码
function howAppWorks($imgUrl, $myClass, event) {
document.getElementById('myImage').src = $imgUrl;
document.getElementById("howTheAppContent").classList.remove('addEvent', 'fillTheForm', 'rrtFlowSheet');
document.getElementById("howTheAppContent").classList.add($myClass);
// Add active class to the current button (highlight it)
var header = document.getElementById("appWorksList");
var btns = header.getElementsByClassName("custom-class");
for (var i = 0; i < btns.length; i++) {
btns[i].addEventListener("click", function() {
var current = document.getElementsByClassName("active");
current[0].className = current[0].className.replace(" active", "");
this.className += " active";
});
}
}Run Code Online (Sandbox Code Playgroud)
<div class="row">
<div class="col-md-6">
<div class="content">
<div class="howTheAppWorksContent addEvent" id="howTheAppContent">
<img id="myImage" src="http://localhost/projects/rrs-website/wp-content/uploads/2021/11/how-the-app-works.png" alt="">
</div>
</div>
</div>
<div class="col-md-6" id="appWorksList"> …Run Code Online (Sandbox Code Playgroud)