Js achieves car Image Display instance selection for imitation Baidu automotive Channel

Source: Internet
Author: User

Js achieves car Image Display instance selection for imitation Baidu automotive Channel

This article mainly introduces how to use javascript to display pictures of cars that are similar to Baidu car channels. The example analyzes the javascript mouse event operation css style skills, which is of great practical value. For more information, see

?

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

<! 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 content = "text/html; charset = UTF-8" http-equiv = "Content-Type"/>

<Title> let people who know about the car help you select the car </title>

<Style type = "text/css">

* {Margin: 0; padding: 0 ;}

Body {font-family: \ 5B8B \ 4F53, Tahoma, Arial Narrow, arial, serif; font-size: 12px; color: #000; line-height: 1.5em; background: # fff; padding-top: 100px ;}

A: link, a: visited, a: hover, a: active {color: # fff; text-decoration: none ;}

. Main {margin: 0 auto; width: 978px; height: 165px; border: 1px # DFE5E7 solid; text-align: center; background: url (http://xuanche.baidu.com/static/cms/images/banner.jpg) no-repeat center; position: relative ;}

. Single {position: absolute ;}

. Single a {width: 100%; height: 100%; display: none; position: absolute; left:-3px ;}

. Single a span {position: absolute; bottom:-20px; left: 0; width: 100%; height: 20px; line-height: 20px; background: # AE0D00; color: # fff; text-align: center; display: block; border: 3px # AE0D00 solid; box-shadow: 3px 2px 3px # A0A0A0 ;}

. Show {border: 3px # AE0D00 solid; cursor: pointer; box-shadow: 3px 2px 3px # A0A0A0 ;}

. Show a {display: block; z-index: 99 ;}

. Caraa {left: 5px; top: 4px; width: 203px; height: 151px ;}

. Carbb {left: 209px; top: 4px; width: 101px; height: 101px ;}

. Carcc {left: 260px; top: pixel PX; width: 101px; height: 50px ;}

. Cardd {left: 362px; top: 4px; width: 101px; height: 50px ;}

. Caree {left: 362px; bottom: 3px; width: 152px; height: 102px ;}

. Carff {left: 515px; top: 4px; width: 101px; height: 101px ;}

. Cargg {left: 515px; bottom: 3px; width: 101px; height: 50px ;}

. Carhh {left: 719px; top: 4px; width: 101px; height: 50px ;}

. Carii {left: 821px; top: 4px; width: 145px; height: 102px ;}

. Carjj {left: 872px; bottom: 3px; width: 94px; height: 50px ;}

. Maintext {position: absolute; width: 50px; height: 50px; line-height: 50px; text-align: center; z-index: 1 ;}

. Maintext p {font-family: ""; font-size: 19px; font-weight: bold; color: # BBBFC1 ;}

. Maintext p span {font-size: 14px ;}

. Fuel {left: 312px; top: 58px ;}

. Power {left: 620px; top: 7px ;}

. Control {left: margin PX; top: margin PX ;}

. Include {position: absolute; left: 620px; top: 58px; width: 203px; height: 80px; padding-top: 20px ;}

. Include p {font-size: 14px; font-family: ""; font-weight: bold; color: # BBBFC1; line-height: 30px ;}

. Include p span {font-size: 18px; font-family: Arial, Tahoma, sans-serif; color: # fff ;}

</Style>

</Head>

<Body>

<! -- Subject start -->

<Div class = "main">

<! -- Kia -->

<Div class = "single caraa" onmouseover = "this. className = 'single caraa show '" onmouseout = "this. className = 'single cara'">

<A href = "#" target = "_ blank">

<Span> Kia K5 </span>

</A>

</Div>

<! -- Kia end -->

<! -- Yinglang -->

<Div class = "single carbb" onmouseover = "this. className = 'single carbb show '" onmouseout = "this. className = 'single carbb'">

<A href = "#" target = "_ blank">

<Span> Ying Lang </span>

</A>

</Div>

<! -- Yinglang end -->

<! -- Jetta -->

<Div class = "single carcc" onmouseover = "this. className = 'single carcc show '" onmouseout = "this. className = 'single carcc'">

<A href = "#" target = "_ blank">

<Span> Jetta </span>

</A>

</Div>

<! -- Jetta end -->

<! -- Start with POLO -->

<Div class = "single cardd" onmouseover = "this. className = 'single cardd show '" onmouseout = "this. className = 'single cardd'">

<A href = "#" target = "_ blank">

<Span> POLO </span>

</A>

</Div>

<! -- POLO end -->

<! -- Starting with Tiguan -->

<Div class = "single caree" onmouseover = "this. className = 'single caree show '" onmouseout = "this. className = 'single caree'">

<A href = "#" target = "_ blank">

<Span> Tiguan </span>

</A>

</Div>

<! -- End of Tiguan -->

<! -- Cruz -->

<Div class = "single carff" onmouseover = "this. className = 'single carff show '" onmouseout = "this. className = 'single carff'">

<A href = "#" target = "_ blank">

<Span> corouz </span>

</A>

</Div>

<! -- Cruz finished -->

<! -- Lavida -->

<Div class = "single cargg" onmouseover = "this. className = 'single cargg show '" onmouseout = "this. className = 'single cargg'">

<A href = "#" target = "_ blank">

<Span> lavida </span>

</A>

</Div>

<! -- Lavida ends -->

<! -- Fast start -->

<Div class = "single carhh" onmouseover = "this. className = 'single carhh show '" onmouseout = "this. className = 'single carhh'">

<A href = "#" target = "_ blank">

<Span> sagitar </span>

</A>

</Div>

<! -- The end of fast Teng -->

<! -- Starting with Bora -->

<Div class = "single carii" onmouseover = "this. className = 'single carii show '" onmouseout = "this. className = 'single carii'">

<A href = "#" target = "_ blank">

<Span> Bora </span>

</A>

</Div>

<! -- Baolai end -->

<! -- Fox -->

<Div class = "single carjj" onmouseover = "this. className = 'single carjj show '" onmouseout = "this. className = 'single carjj'">

<A href = "#" target = "_ blank">

<Span> Fox </span>

</A>

</Div>

<! -- FOX ends -->

<Div class = "maintext fuel">

<P> Save <span> oil </span> </p>

</Div>

<Div class = "maintext power">

<P> <span> force </span> </p>

</Div>

<Div class = "maintext control">

<P> operation <span> Control </span> </p>

</Div>

<Div class = "include">

<P> A total of <span> 389 </span> vehicles </p>

<P> existing <span> 3499 </span> car owner reviews </p>

</Div>

</Div>

<! -- End of the Subject -->

</Body>

</Html>

I hope this article will help you design javascript programs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.