当前位置:首页 >> 网络编程

浅谈jQuery效果函数

jQuery有很多的效果可以实现,比如说淡入淡出的效果:<html>

 <head>
    <style>
      #box{width:200px;height:200px;background:red;opacity:1;}
    </style>
  </head>
  <body>
    <div id="box">
    </div>
    <input type="button" value="隐藏/显示"id="bt1"><br/><br/>
    <input type="button" value="淡入"id="bt2"><br/><br/>
    <input type="button" value="淡出"id="bt3"><br/><br/>
    <input type="button" value="滑入"id="bt4"><br/><br/>
    <input type="button" value="滑出"id="bt5"><br/><br/>
    <input type="button" value="半透明"id="bt6"><br/><br/>
    <input type="button" value="滑入/滑出"id="bt7"><br/><br/>
    <input type="button" value="淡入入/淡出"id="bt7"><br/><br/>
  </body>
  <script src="/UploadFiles/2021-04-02/jquery-1.6.js">

jQuery也可以来实现一个滚动字幕的效果,比如说下边这个例子:<html>

<head>
    <style>
      #box{width:300px;height:50px;border:2px dashed violet;overflow:hidden;line-height:50px;margin:0 auto;color:red;font-size:30px;}
      
    </style>
  </head>
  <body>
    <div id="box"></div>
  </body>
  <script src="/UploadFiles/2021-04-02/jquery-1.7.1.min.js">

jQuery可以用来实现一个删除功能的实现,比如:<html>

<head>
    <style>
      #box{
        width:400px;
        height:200px;
        border:1px solid black;
        }
    </style>
  </head>
  <body>
    <div id="box">
        <p id="a">第一a</p>
        <p>第二</p>
        <p id="a">第三a</p>
        <p>第四</p>
    </div>
    <button id="del">删除</button>
    <button id="cle">清空</button>
  </body>
  <script src="/UploadFiles/2021-04-02/jquery-1.6.js">

jQuery还会做出一选课功能的实现,比如:<html>

<head>
<title></title>
<style>
li{
  list-style:none;
}
#you{
  position:absolute;
  left:300px;
  top:10px;
}
ul{
  position:absolute;
  left:150px;
  top:10px;
}
</style>
<script src="/UploadFiles/2021-04-02/jquery-1.6.js">

jQuery还能够实现下滑框功能:<!DOCTYPE html>

<html>
<head>
<script src="/UploadFiles/2021-04-02/jquery-1.11.1.min.js">

jQuery还能做一些向上轮播图片广告的功能:<html>

<head>
    <style>
      #box{width:600px;height:300px;overflow:hidden;border:1px solid #000;margin:0 auto;}
      ul{list-style:none;}
      img{width:600px;height:300px;}
      *{padding:0;margin:0;}
    </style>
  </head>
  <body>
    
    <div id="box">
      <ul id="pic">
        <li><img src="/UploadFiles/2021-04-02/1.png">

jQuery还能实现两个下拉展开于闭合的效果于一体的:<!DOCTYPE html>

<html>
<head>
<script src="/UploadFiles/2021-04-02/jquery-1.11.1.min.js">

以上就是我分享给大家的,谢谢。

关于这篇jQuery效果函数就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。