我在一个页面中有9个图像,并且布局看起来像9个图像的网格.当我点击图像时,我有一个想要用作每个图像边框的图像.这是一个带边框的透明图像,就像确认图像的选择一样.
我怎样才能实现这一点?当我点击图像时,当我点击图像边框图像应该消失时,边框图像会反复出现.
有没有办法只使用HTML和CSS来实现它
.image1 {
left: 786 px;
top: 629 px;
position: absolute;
width: 441 px;
height: 243 px;
float: left;
}
.image2 {
left: 1284 px;
top: 629 px;
position: absolute;
width: 441 px;
height: 243 px;
float: left;
}
.image3 {
left: 289 px;
top: 920 px;
position: absolute;
width: 441 px;
height: 243 px;
float: left;
}
<html>
<body>
<div class="image1">
<img src="images/image1.png" />
</div>
<div class="image2">
<img src="images/image2.png" />
</div>
<div class="image3">
<img src="images/image3.png" />
</div> …Run Code Online (Sandbox Code Playgroud) 我有一个角度组件,它又包含两个组件,我想确保只有在第一个组件完全渲染后才加载/渲染第二个组件,我该如何实现?
组合.component.html
<first-component></first-component>
<second-component></second-component>
Run Code Online (Sandbox Code Playgroud)
组合.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'main-component',
templateUrl: './combined.component.html',
styleUrls: ['./combined.component.css']
})
export class CombimedComponent {
}
Run Code Online (Sandbox Code Playgroud) 我已经RouterReuseStrategy为我的应用程序准备好了,如下所示
import {
RouteReuseStrategy,
ActivatedRouteSnapshot,
DetachedRouteHandle,
} from '@angular/router';
export class CustomRouteReuseStrategy implements RouteReuseStrategy {
private handlers: { [key: string]: DetachedRouteHandle } = {};
/**
* Determines if this route (and its subtree) should be detached to be reused later
*/
shouldDetach(route: ActivatedRouteSnapshot): boolean {
if (!route.routeConfig || route.routeConfig.loadChildren) {
return false;
}
/** Whether this route should be re used or not */
let shouldReuse = false;
if (route.routeConfig.data) {
route.routeConfig.data.reuse ? shouldReuse = true : shouldReuse …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用图像将图像对齐到out div元素的底部vertical-align,但这vertical-align似乎不起作用,图像根本不移动.
<div class="row">
<div class="col-md-1">
<img src="../images/image.png" style="height: 20px; width: 20px;cursor:pointer"/>
</div>
<div class=col-md-11 >
<div style="overflow:auto;height:300px"></div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我正在使用bootstrap类进行对齐.有没有什么可以使图像div对齐到外的底部div?这是采取height的第二个div这是300px;.