> 웹 프론트엔드 > JS 튜토리얼 > jquery는 썸네일로 사용자 정의 가능한 높이 갤러리 효과를 구현합니다(5가지 유형)_jquery

jquery는 썸네일로 사용자 정의 가능한 높이 갤러리 효과를 구현합니다(5가지 유형)_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
풀어 주다: 2016-05-16 15:41:52
원래의
1224명이 탐색했습니다.

이 기사의 예에서는 jquery의 사용자 정의 가능한 높이 갤러리 효과를 설명합니다. 참고할 수 있도록 모든 사람과 공유하세요. 세부 내용은 다음과 같습니다.
이것은 jquery를 기반으로 한 사용자 정의 가능한 높이 갤러리 효과 코드입니다. 매우 예술적이며 5가지 비행 표시 효과가 포함되어 있습니다. 가장 큰 특징은 높이를 사용자 정의할 수 있다는 것입니다.
运行效果图:                           ------查看效果 下载源码------------ --------

팁: 브라우저가 제대로 작동하지 않으면 탐색 모드를 전환해 보세요.
귀하에게 공유된 jquery 이미지 스크롤 및 확대/축소 효과 코드는 다음과 같습니다

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>

<head>

 <link rel="stylesheet" type="text/css" href="jquery.ad-gallery.css">

 <script type="text/javascript" src="jquery.min.js"></script>

 <script type="text/javascript" src="jquery.ad-gallery.js"></script>

 <script type="text/javascript">

 $(function() {

 $('img.image1').data('ad-desc', 'Whoa! This description is set through elm.data("ad-desc") instead of using the longdesc attribute.<br>And it contains <strong>H</strong>ow <strong>T</strong>o <strong>M</strong>eet <strong>L</strong>adies... <em>What&#63;</em> That aint what HTML stands for&#63; Man...');

 $('img.image1').data('ad-title', 'Title through $.data');

 $('img.image4').data('ad-desc', 'This image is wider than the wrapper, so it has been scaled down');

 $('img.image5').data('ad-desc', 'This image is higher than the wrapper, so it has been scaled down');

 var galleries = $('.ad-gallery').adGallery();

 $('#switch-effect').change(

 function() {

 galleries[0].settings.effect = $(this).val();

 return false;

 }

 );

 $('#toggle-slideshow').click(

 function() {

 galleries[0].slideshow.toggle();

 return false;

 }

 );

 $('#toggle-description').click(

 function() {

 if(!galleries[0].settings.description_wrapper) {

  galleries[0].settings.description_wrapper = $('#descriptions');

 } else {

  galleries[0].settings.description_wrapper = false;

 }

 return false;

 }

 );

 });

 </script>

 

 <style type="text/css">

 * {

 font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Arial, sans-serif;

 color: #333;

 line-height: 140%;

 }

 select, input, textarea {

 font-size: 1em;

 }

 body {

 padding: 30px;

 font-size: 70%;

 width: 1250px;

 }

 h2 {

 margin-top: 1.2em;

 margin-bottom: 0;

 padding: 0;

 border-bottom: 1px dotted #dedede;

 }

 h3 {

 margin-top: 1.2em;

 margin-bottom: 0;

 padding: 0;

 }

 .example {

 border: 1px solid #CCC;

 background: #f2f2f2;

 padding: 10px;

 }

 ul {

 list-style-image:url(list-style.gif);

 }

 pre {

 font-family: "Lucida Console", "Courier New", Verdana;

 border: 1px solid #CCC;

 background: #f2f2f2;

 padding: 10px;

 }

 code {

 font-family: "Lucida Console", "Courier New", Verdana;

 margin: 0;

 padding: 0;

 }

 

 #gallery {

 padding: 30px;

 background: #e1eef5;

 }

 #descriptions {

 position: relative;

 height: 50px;

 background: #EEE;

 margin-top: 10px;

 width: 640px;

 padding: 10px;

 overflow: hidden;

 }

 #descriptions .ad-image-description {

 position: absolute;

 }

 #descriptions .ad-image-description .ad-description-title {

 display: block;

 }

 </style>

 <title>jQuery画廊</title>

</head>

<body>

<div align="center">

 <div id="container">

 <h1>jQuery画廊插件</h1>

 <p>一个高度可定制的画廊jQuery插件。</p>

 

 <div id="gallery" class="ad-gallery">

 <div class="ad-image-wrapper">

 </div>

 <div class="ad-controls">

 </div>

 <div class="ad-nav">

 <div class="ad-thumbs">

  <ul class="ad-thumb-list">

  <li>

  <a href="images/1.jpg">

  <img src="images/thumbs/t1.jpg" class="image0">

  </a>

  </li>

  <li>

  <a href="images/10.jpg">

  <img src="images/thumbs/t10.jpg" title="A title for 10.jpg" alt="This is a nice, and incredibly descriptive, description of the image 10.jpg" class="image1">

  </a>

  </li>

  <li>

  <a href="images/11.jpg">

  <img src="images/thumbs/t11.jpg" title="A title for 11.jpg" longdesc="http://coffeescripter.com" alt="This is a nice, and incredibly descriptive, description of the image 11.jpg" class="image2">

  </a>

  </li>

  <li>

  <a href="images/12.jpg">

  <img src="images/thumbs/t12.jpg" title="A title for 12.jpg" alt="This is a nice, and incredibly descriptive, description of the image 12.jpg" class="image3">

  </a>

  </li>

  <li>

  <a href="images/13.jpg">

  <img src="images/thumbs/t13.jpg" title="A title for 13.jpg" alt="This is a nice, and incredibly descriptive, description of the image 13.jpg" class="image4">

  </a>

  </li>

  <li>

  <a href="images/14.jpg">

  <img src="images/thumbs/t14.jpg" title="A title for 14.jpg" alt="This is a nice, and incredibly descriptive, description of the image 14.jpg" class="image5">

  </a>

  </li>

  <li>

  <a href="images/2.jpg">

  <img src="images/thumbs/t2.jpg" title="A title for 2.jpg" alt="This is a nice, and incredibly descriptive, description of the image 2.jpg" class="image6">

  </a>

  </li>

  <li>

  <a href="images/3.jpg">

  <img src="images/thumbs/t3.jpg" title="A title for 3.jpg" alt="This is a nice, and incredibly descriptive, description of the image 3.jpg" class="image7">

  </a>

  </li>

  <li>

  <a href="images/4.jpg">

  <img src="images/thumbs/t4.jpg" title="A title for 4.jpg" alt="This is a nice, and incredibly descriptive, description of the image 4.jpg" class="image8">

  </a>

  </li>

  <li>

  <a href="images/5.jpg">

  <img src="images/thumbs/t5.jpg" title="A title for 5.jpg" alt="This is a nice, and incredibly descriptive, description of the image 5.jpg" class="image9">

  </a>

  </li>

  <li>

  <a href="images/6.jpg">

  <img src="images/thumbs/t6.jpg" title="A title for 6.jpg" alt="This is a nice, and incredibly descriptive, description of the image 6.jpg" class="image10">

  </a>

  </li>

  <li>

  <a href="images/7.jpg">

  <img src="images/thumbs/t7.jpg" title="A title for 7.jpg" alt="This is a nice, and incredibly descriptive, description of the image 7.jpg" class="image11">

  </a>

  </li>

  <li>

  <a href="images/8.jpg">

  <img src="images/thumbs/t8.jpg" title="A title for 8.jpg" alt="This is a nice, and incredibly descriptive, description of the image 8.jpg" class="image12">

  </a>

  </li>

  <li>

  <a href="images/9.jpg">

  <img src="images/thumbs/t9.jpg" title="A title for 9.jpg" alt="This is a nice, and incredibly descriptive, description of the image 9.jpg" class="image13">

  </a>

  </li>

  </ul>

 </div>

 </div>

 </div>

 

 

 <p>选择飞行效果:<select id="switch-effect">

 <option value="slide-hori">水平滑动</option>

 <option value="slide-vert">垂直平滑</option>

 <option value="resize">收缩/伸长</option>

 <option value="fade">褪色效果</option>

 <option value="">无效果</option>

 </select><br>

 </p>

 </div>

<div style="text-align:center;clear:both">

</body>

</html>

로그인 후 복사

위는 귀하와 공유된 jquery 사용자 정의 가능한 높이 갤러리 효과 코드입니다. 마음에 드셨으면 좋겠습니다.

본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿