jQuery(3-10)css-DOM操作

來源:互聯網
上載者:User

 

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>css-DOM操作.html</title>
 
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
   
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

  <script type="text/javascript" src="../jquery-1.7.1.js"></script>
 
</head>
  <body><img src="../008.jpg" width="300" height="300" id="photo" class="photo"></img>
 
  </body>
  <script type="text/javascript">
  //opacity 透明效果

  $(function(){
  $('#photo').css('opacity','0.5');
  var $aa =   $('#photo').css('height');  //得到p元素的高度

  alert($aa);
  $('#photo').css('height' , '400');
//設定 p元素的高度
  })

//透明效果記一下
  </script>
  
</html>

相關文章

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.