Hyperlink 帮助将超链接插入CSS sprite代码..Java?HTML?
使用内置Javascript在CS5中进行滚动图像处理非常简单,但是,我需要基于CSS进行此操作 我已经设法让代码工作,精灵都很好,但我似乎有一个问题…我需要使这些点击(指向)到一个网址。我尝试了各种方法,包括在div行中添加Hyperlink 帮助将超链接插入CSS sprite代码..Java?HTML?,hyperlink,sprite,css-sprites,flash-cs5,clickable,Hyperlink,Sprite,Css Sprites,Flash Cs5,Clickable,使用内置Javascript在CS5中进行滚动图像处理非常简单,但是,我需要基于CSS进行此操作 我已经设法让代码工作,精灵都很好,但我似乎有一个问题…我需要使这些点击(指向)到一个网址。我尝试了各种方法,包括在div行中添加url。我甚至尝试将url与图像一起放置。我不想像我在其他地方看到的那样,从头开始使用方法。我甚至不能让它工作…总之,有没有简单的方法让精灵指向url…谢谢 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transition
url。我甚至尝试将url与图像一起放置。我不想像我在其他地方看到的那样,从头开始使用
方法。我甚至不能让它工作…总之,有没有简单的方法让精灵指向url…谢谢
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<body>
<style type="text/css">
.sprites {
background-image : url(http://sheldontechnology.com/social/facebooksprite.png);
background-color : transparent;
background-repeat : no-repeat;
}
#facebooksprite {
height : 75px;
width : 100px;
background-position : -0px -75px;
padding-left:10px;
float: left;
}
#facebooksprite:hover {
background-position : -0px 0px;
}
.sprites2 {
background-image : url(http://sheldontechnology.com/social/twittersprite.png);
background-color : transparent;
background-repeat : no-repeat;
}
#twittersprite {
height : 75px;
width : 100px;
background-position : -0px -75px;
float:left;
}
#twittersprite:hover {
background-position : -0px 0px;
}
.sprites3 {
background-image : url(http://sheldontechnology.com/social/flickrsprite.png);
background-color : transparent;
background-repeat : no-repeat;
}
#flickrsprite {
height : 75px;
width : 100px;
background-position : -0px -75px;
float:left;
}
#flickrsprite:hover {
background-position : -0px 0px;
}
.sprites4 {
background-image : url(http://sheldontechnology.com/social/youtubesprite.png);
background-color : transparent;
background-repeat : no-repeat;
}
#youtubesprite {
height : 75px;
width : 100px;
background-position : -0px -75px;
float:left;
}
#youtubesprite:hover {
background-position : -0px 0px;
}
.sprites5 {
background-image : url(http://sheldontechnology.com/social/tumblrsprite.png);
background-color : transparent;
background-repeat : no-repeat;
}
#tumblrsprite {
height : 75px;
width : 100px;
background-position : -0px -75px;
float:left;
}
#tumblrsprite:hover {
background-position : -0px 0px;
}
.sprites6 {
background-image : url(http://sheldontechnology.com/social/bloggersprite.png);
background-color : transparent;
background-repeat : no-repeat;
}
#bloggersprite {
height : 75px;
width : 100px;
background-position : -0px -75px;
float:left;
}
#bloggersprite:hover {
background-position : -0px 0px;
}
.sprites7 {
background-image : url(http://sheldontechnology.com/social/googleplacessprite.png);
background-color : transparent;
background-repeat : no-repeat;
}
#googleplacessprite {
height : 73px;
width : 94px;
background-position : -0px -73px;
float:left;
}
#googleplacessprite:hover {
background-position : -0px 0px;
}
.sprites8 {
background-image : url(http://sheldontechnology.com/social/yelpsprite.png);
background-color : transparent;
background-repeat : no-repeat;
}
#yelpsprite {
height : 75px;
width : 97px;
background-position : -0px -75px;
float:left;
}
#yelpsprite:hover {
background-position : -0px 0px;
</style>
<div class="sprites" id="facebooksprite"></div>
<div class="sprites2" id="twittersprite"></div>
<div class="sprites3" id="flickrsprite"></div>
<div class="sprites4" id="youtubesprite"></div>
<div class="sprites5" id="tumblrsprite"></div>
<div class="sprites6" id="bloggersprite"></div>
<div class="sprites7" id="googleplacessprite"></div>
<div class="sprites8" id="yelpsprite"></div>
</body>
</html>
无标题文件
.sprites{
背景图片:url(http://sheldontechnology.com/social/facebooksprite.png);
背景色:透明;
背景重复:无重复;
}
#facebooksprite{
高度:75px;
宽度:100px;
背景位置:-0px-75px;
左侧填充:10px;
浮动:左;
}
#facebooksprite:hover{
背景位置:-0px 0px;
}
.sprites2{
背景图片:url(http://sheldontechnology.com/social/twittersprite.png);
背景色:透明;
背景重复:无重复;
}
#推特精灵{
高度:75px;
宽度:100px;
背景位置:-0px-75px;
浮动:左;
}
#推特精灵:悬停{
背景位置:-0px 0px;
}
.sprites3{
背景图片:url(http://sheldontechnology.com/social/flickrsprite.png);
背景色:透明;
背景重复:无重复;
}
#flickrsprite{
高度:75px;
宽度:100px;
背景位置:-0px-75px;
浮动:左;
}
#flickrsprite:hover{
背景位置:-0px 0px;
}
.sprites4{
背景图片:url(http://sheldontechnology.com/social/youtubesprite.png);
背景色:透明;
背景重复:无重复;
}
#youtubesprite{
高度:75px;
宽度:100px;
背景位置:-0px-75px;
浮动:左;
}
#youtubesprite:悬停{
背景位置:-0px 0px;
}
.sprites5{
背景图片:url(http://sheldontechnology.com/social/tumblrsprite.png);
背景色:透明;
背景重复:无重复;
}
#tumblrsprite{
高度:75px;
宽度:100px;
背景位置:-0px-75px;
浮动:左;
}
#tumblrsprite:悬停{
背景位置:-0px 0px;
}
.sprites6{
背景图片:url(http://sheldontechnology.com/social/bloggersprite.png);
背景色:透明;
背景重复:无重复;
}
#博客精灵{
高度:75px;
宽度:100px;
背景位置:-0px-75px;
浮动:左;
}
#bloggersprite:hover{
背景位置:-0px 0px;
}
.sprites7{
背景图片:url(http://sheldontechnology.com/social/googleplacessprite.png);
背景色:透明;
背景重复:无重复;
}
#GooglePlacesPrite{
高度:73px;
宽度:94px;
背景位置:-0px-73px;
浮动:左;
}
#GooglePlacesPrite:悬停{
背景位置:-0px 0px;
}
.精灵8{
背景图片:url(http://sheldontechnology.com/social/yelpsprite.png);
背景色:透明;
背景重复:无重复;
}
#yelpsprite{
高度:75px;
宽度:97px;
背景位置:-0px-75px;
浮动:左;
}
#yelpsprite:悬停{
背景位置:-0px 0px;
元素使用链接-a
,并带有指向您的目的地的适当的href
属性。我不想问,您能告诉我用a href替换代码需要什么吗?。我必须从头开始吗?在您的标记中,用“class=”sprites“id=”替换facebooksprite“>哇,我很抱歉我已经为此工作了6个小时!您在一分钟内就解决了它!非常感谢您的时间和帮助,我非常感谢!要嵌入您的代码,请将其粘贴到编辑器中,突出显示并点击“{}”按钮(或将其全部缩进4个空格)。下次:)