• day65 作业


    作业1

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
    <div id="app">
         <p :style="myStyle"></p>
         <button @click="f1">红</button>
         <button @click="f2">黄</button>
         <button @click="f3">蓝</button>
    </div>
    </body>
    <script src="js/vue.js"></script>
    <script>
        new Vue({
            el:'#app',
            data:{
                myStyle:{
                    '200px',
                    height:'200px',
                    backgroundColor:'black'
                }
            },
            methods:{
                f1(){
                    this.myStyle.backgroundColor='red'
                },
                f2(){
                    this.myStyle.backgroundColor='yellow'
                },
                f3(){
                    this.myStyle.backgroundColor='blue'
                }
            }
        })
    </script>
    </html>
    

    作业2

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
    <div id="app">
             <p :style="myStyle" @click="f1"></p>
    </div>
    
    </body>
    <script src="js/vue.js"></script>
    <script>
        new Vue({
            el:'#app',
            data:{
                num:0,
                myStyle:{
                    '200px',
                    height:'200px',
                    backgroundColor:'black'
                }
            },
            methods:{
                f1(){
                    this.num+=1
                    if (this.num%3==1){
                        this.myStyle.backgroundColor='pink'
                    }else if(this.num%3==2){
                        this.myStyle.backgroundColor='green'
                    }else{
                        this.myStyle.backgroundColor='cyan'
                    }
                }
            }
    
        })
    </script>
    </html>
    

    作业3

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    
    
    
    
    </head>
    <body>
    <div id="app">
        <div :style="myStyle2" @click="f1">
          <div :style="myStyle" ></div>
          <div :style="myStyle1"></div>
        </div>
    </div>
    </body>
    <script src="js/vue.js"></script>
    <script>
        new Vue({
            el:'#app',
            data:{
                num:0,
                myStyle:{
                    '50px',
                    height:'100px',
                    backgroundColor:'red',
                    borderRadius:'50px 0 0 50px',
                    float:'left'
                },
                myStyle1:{
                    '50px',
                    height:'100px',
                    backgroundColor:'yellow',
                    borderRadius:'0 50px 50px 0',
                    float:'left'
                },
                myStyle2:{
                    position:'fixed',
                },
    
            },
            methods:{
                f1(){
                   this.num+=1
                    if (this.num%4==1){
                       this.myStyle.width='100px';
                       this.myStyle1.width='100px';
                       this.myStyle.height='50px';
                       this.myStyle1.height='50px';
                       this.myStyle.borderRadius='50px 50px 0 0';
                       this.myStyle1.borderRadius='0 0 50px 50px'
                        this.myStyle.float='none'
                        this.myStyle1.float='none'
                    }else if (this.num%4==2){
                       this.myStyle.width='50px';
                       this.myStyle1.width='50px';
                       this.myStyle.height='100px';
                       this.myStyle1.height='100px';
                       this.myStyle.borderRadius='50px 0 0 50px';
                       this.myStyle1.borderRadius='0 50px 50px 0'
                        this.myStyle.float='left'
                        this.myStyle1.float='left'
                        this.myStyle.backgroundColor='yellow'
                        this.myStyle1.backgroundColor='red'
                    }else if (this.num%4==3){
                        this.myStyle.width='100px';
                       this.myStyle1.width='100px';
                       this.myStyle.height='50px';
                       this.myStyle1.height='50px';
                       this.myStyle.borderRadius='50px 50px 0 0';
                       this.myStyle1.borderRadius='0 0 50px 50px'
                        this.myStyle.float='none'
                        this.myStyle1.float='none'
                        this.myStyle.backgroundColor='yellow'
                        this.myStyle1.backgroundColor='red'
                    }else{
                       this.myStyle.width='50px';
                       this.myStyle1.width='50px';
                       this.myStyle.height='100px';
                       this.myStyle1.height='100px';
                       this.myStyle.borderRadius='50px 0 0 50px';
                       this.myStyle1.borderRadius='0 50px 50px 0'
                        this.myStyle.float='left'
                        this.myStyle1.float='left'
                        this.myStyle.backgroundColor='red'
                        this.myStyle1.backgroundColor='yellow'
                    }
    
            }
        }
        })
    </script>
    </html>
    
  • 相关阅读:
    [IIS] IIS Framework "aspnet_regiis.exe" 注册
    [Bootstrap] install Bootstrap framework in window 7 by npm
    [Window] .MUS 0x80070422 Error
    【IIS】模块 DLL C:WindowsSystem32inetsrvauthcert.dll 未能加载。返回的数据为错误信息。
    【IIS】IIS 7.0/7.5 无法启动 w3svc 服务
    【IIS】IIS 7.0/7.5 绑定
    【SharePoint 2010】SharePoint 2010开发方面的课堂中整理有关问题
    『SharePoint 2010』Sharepoint 2010 Form 身份认证的实现(基于SQL)
    『SharePoint 2010』Sharepoint 2010 Form 身份认证的实现(基于AD)
    比较好用的Opera 翻译工具 ddict
  • 原文地址:https://www.cnblogs.com/zqfzqf/p/12052025.html
Copyright © 2020-2023  润新知