简体   繁体   English

如何将图像附加到特定位置的另一个元素上?

[英]How to attach an image onto another element in certain spot?

Not sure if I worded my question well enough... here goes, 不知道我说的话是否足够好...这里,

I am trying to re-create the behavior as shown in the image below: 我正在尝试重新创建行为,如下图所示:

Desired Result 所需结果 在此处输入图片说明

I know how to make the panel slide in from the right, as shown here (except they come in from left): https://www.w3schools.com/howto/howto_js_curtain_menu.asp 我知道如何使面板从右侧滑入,如此处所示(除了它们从左侧滑入): https : //www.w3schools.com/howto/howto_js_curtain_menu.asp

So my question is, how would I affix the "X" close button?? 所以我的问题是,如何贴上“ X”关闭按钮?

Thanks for looking... 感谢您的关注...

Ps. 附言 Here is the link to the curtain sliding in from the right: How to convert Slide from Left Curtain Menu , to Slide in From Right 这是从右滑入窗帘的链接: 如何将“从左窗帘菜单滑入”幻灯片转换为“从右滑入”窗帘

Function call to hide naveBar. 函数调用隐藏naveBar。

function closeNav() {
    document.getElementById("myNav").style.width = "0%";
 }

Calling from: 致电:

<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM