Code Monkey home page Code Monkey logo

avalon.pilotui's People

Contributors

rubylouvre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

avalon.pilotui's Issues

@提示组件

难点是要得@距离文本区的左边与上边的距离。

<!DOCTYPE html>
<html>
    <head>
        <title>@提示组件</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">

        <script src="jquery.js">

        </script>
        <script>

            $(function() {
                var div
                $("textarea").on("input", function() {
                    var self = $(this)
                    if (/@/.test(this.value)) {
                        if (!div) {
                            div = $("<div/>").appendTo("body").css({
                                width: self.width(),
                                height: self.height(),
                                border: "1px  solid  red"
                            }).text(self.val())
                        }
                    }
                })
            })


        </script>

    </head>
    <body>
        <textarea>

        </textarea>
    </body>
</html>

image

透明穿透

<!DOCTYPE html>
<html class="p-index">
    <head>
        <meta charset="utf-8" />
        <title>透明穿透</title>
        <meta name="description" content="" />
        <meta name="keywords" content="" />
        <meta name="author" content="" />
        <script src="avalon.js">

        </script>
        <style>
            html,body{_height:100%;margin:0;padding:0;}
            #aaa{
                background: red;
                width:180px;
                height:180px;
                padding:2px;
                border:5px solid green;

            }
            #bbb{
                width:220px;
                height:220px;
                position: absolute;/*或fixed, relative*/
                top:0px;
                left:0px;
                border:1px solid black;
                filter:alpha(opacity=50);/*透明或半透明 ,IE9还可以用opacity, 还可以用progid:DXImageTransform.Microsoft.gradient*/

                pointer-events: none;
            }

        </style>
        <script>
            avalon.define("test", function(vm) {
                vm.click = function() {
                    alert(this.id)
                }
            })
        </script>

    </head>
    <body>
        <div ms-controller="test" style="position: relative;padding:50px;">

            <div id="aaa" ms-click="click">
                <p>这是底层的DIV</P>
                <p>点击它上面的文本或图片或表单控件或元素边框会发生穿透</p>
                <input>
            </div>

            <div id="bbb">这是绝对定位的DIV,浮在div#aaa的上方

            </div>

        </div>
    </body>
</html>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.