点击图片移到最前面? [英] Click on image to move to front?

查看:81
本文介绍了点击图片移到最前面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以向我指出正确的方向,以便我可以创建类似 this的函数吗?

Can somebody point me in the right direction so I can create a function like this?

我想创建类似的内容,当您单击一堆图像中的图像时,它会显示在最前面.

I want to create something similar that when you click on an image in a stack of images it brings it to the front.

似乎找不到它的名称.

推荐答案

$("img.myclass").click(function() {
     $("img.myclass").not(this).css("z-index", 0);
     $(this).css("z-index", 100);
});

应该帮助您入门

这篇关于点击图片移到最前面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆