Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
单击..后如何增加css文档菜单面板图像并调整其大小。。?_Css - Fatal编程技术网

单击..后如何增加css文档菜单面板图像并调整其大小。。?

单击..后如何增加css文档菜单面板图像并调整其大小。。?,css,Css,我有一个css3 dock菜单面板,其中包含8个图像。如果单击某个图像,我想增加其大小/更改背景色,反之亦然,同时单击另一个图像。上一个图像应重新调整大小或删除背景色…我如何做到这一点?如果可以,请尝试js <script> document.getElementById("wantedelement").attribute_size="newvalue"; </script> document.getElementById(“wantedelement”).att

我有一个css3 dock菜单面板,其中包含8个图像。如果单击某个图像,我想增加其大小/更改背景色,反之亦然,同时单击另一个图像。上一个图像应重新调整大小或删除背景色…我如何做到这一点?

如果可以,请尝试js

<script>
document.getElementById("wantedelement").attribute_size="newvalue"; 
</script>

document.getElementById(“wantedelement”).attribute_size=“newvalue”;
试试这个-

HTML

<a href="#zoom1"><img id="zoom1" src="http://lorempixel.com/100/100" alt="" /></a>
<a href="#zoom2"><img id="zoom2" src="http://lorempixel.com/100/100" alt="" /></a>
<a href="#zoom3"><img id="zoom3" src="http://lorempixel.com/100/100" alt="" /></a>