English 中文(简体)
cs 或 js 固定的图像滚动,在窗口调整大小时产生“粘入背景”效应
原标题:css or js anchored image rollover with "glued to background" effect on window resize

我试图创建这个功能已有几天, 没有100%的工作结果 。 我想为我的网站做5个固定的图像滚动( 用于导航菜单) 。 我一定已经读过十多个教程了。 有些建议我使用js, 另一些建议cs. 所有建议都产生了问题。 最普遍的问题是, 当我用 cs 进行功能的图像滚动, 并将其定位时, 它不会在调整浏览器窗口时, 将其位置与其它图像( 具有“ 粘贴到背景” 效果) 的比例化 。 基本上, 我希望所有图像( 包括滚动) 都具有“ 粘贴到背景” 效果 。

在壁炉中,滚动效果只有在鼠标悬浮在图像的顶部25%上方,而“附在背景”效果不起作用时才有效。在染色体中,环绕滚动图像效果很好,但“附在背景”效果也行不通。这里的代码是:

#news {
position:relative;
left:180px;
bottom:450px;
width:210px;
height:67px;
}


<div id="news" align="center">
<a href="news.html" 
onmouseover="document.news.src= newsRO.png " 
onmouseout="document.news.src= news.png ">
<img src="news.png" name="news" width="210px" height="67"/>
</a>
</div>

here s a link to a live example: http://www.scissormanmusic.com/index_new2.html there s clearly a lot of positioning & content development i still need to do with some of the other elements on the site. but i should be able to get them in the right places once i can get the menu to function properly...i think

感谢诸位的洞察力。 谢谢!

问题回答

还有什么要显示的代码吗 活生生的例子

通过猜测: 尝试 display: block 在您的锚上尝试 < code> display: block





相关问题
Using QCView and iSight to capture image

I have a QCView that loads a Quartz file which gives you iSights feedback (basically like a QTCaptureView) Everything displays fine The button simply takes a snapshot using the following simple ...

Taking picture with QTCaptureView

Is it possible to simply take a picture and save it somewhere using a QTCaptureView and Apple s built-in iSight? I ve seen lots of tutorials on recording video but none on simply taking a picture. Any ...

Transform rectangular image into trapezoid

In .NET how can I transform an image into a trapezoid. The Matrix class supports rotation, shear, etc, but I can t see a trapezoidal transformation. I m using the usual System.Drawing.* API, but I m ...

Rotate image through Y-axis on web page

What are my options for rotating an image on a web page through the Y-axis? I m not sure if I even have the terminology right. Is this called a rotate or a transform. Most of the searches that I ve ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

Editing a xaml icons or images

Is it possible to edit a xaml icons or images in the expression design or using other tools? Is it possible to import a xaml images (that e.g you have exported) in the expression designer for editing?...

Convert from 32-BPP to 8-BPP Indexed (C#)

I need to take a full color JPG Image and remap it s colors to a Indexed palette. The palette will consist of specific colors populated from a database. I need to map each color of the image to it s "...

热门标签