jQuery realized the method of daily weather report imitating Tencent Microblog sliding effect

  • 2020-06-07 04:01:43
  • OfStack

This paper gives an example of jQuery's method to report the daily weather according to the sliding effect of Tencent Weibo. Share to everybody for everybody reference. The specific analysis is as follows:

This is the daily weather code imitating Tencent Weibo sliding effect. When the mouse is placed on it, the weather content will slide out from left to right, just like opening a drawer. The animation effect is smooth, of course, thanks to jQuery.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> A copy of Tencent weibo's daily weather effects </title>
<style type="text/css">
 width:500px;height:100px;margin:0 auto;
 width:99px;border-right:solid 1px #fff;
.weather_main strong{
.weather_main strong a{
 border-bottom:solid 2px #fff;cursor:pointer;
<script src="jquery-1.6.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
   return false;
   return false;
 <div class="weather">
  <div class="weather_main">
   <strong><a> shenzhen </a></strong>
  <div class="alert">
   <p> If the clouds know, how to cool the wind to accompany ~</p>
 <p><a> Remind friends </a></p>
 </div><!--weather box-->

Hopefully, this article has been helpful in your jQuery programming.

Related articles: