具有行和容器的Web组件网格布局系统?

时间:2015-09-04 16:06:34

标签: twitter-bootstrap polymer grid-layout web-component

是否存在具有行和容器的网格布局系统,可用作Web组件?

我想用聚合物建立一个网站,但我想使用一个网格系统,它会在像这样的小屏幕尺寸上崩溃: http://www.bootply.com/4CJ9GOYEuH

1 个答案:

答案 0 :(得分:0)

默认的flex布局对我来说非常合适。看看这个,它应该解释你需要知道的一切:

http://plnkr.co/edit/xIARqr?p=preview

e.g。根据您的情况,请使用此示例:

.model small
.stack 90h   

.data 
   counter db 0
   curValue db 0
   prevValue db 0 
   hexa db 0
   msg db "Enter a decimal number: $"
   hexmsg db 13,10,"In hexadecimal: $"

.code
    mov ax, @data           ;initialize DS
    mov ds, ax 

                            ;load and display the string msg
    mov ah, 09h
    lea dx, msg         
    int 21h

accept: 
    mov ah, 01          
    int 21h                 ;read a digit

    cmp al, 13              ;compare al with 13
    je hexAccept            ;jump to label exit if input is 13 

    sub al, 48              ;subract al with 48
    mov curValue, al        ;move al to curValue

    cmp counter, 1          ;compare counter with 1
    jl inc_ctr              ;jump to label inc_ctr if al<1

    mov al, prevValue       ;move prevValue to al
    mov bl, 10
    mul bl

    add al, curValue        ;add curValue to al

    mov prevValue, al       ;move al tp prevValue

    inc counter             ;inc_ctr counter
    jmp accept              ;jump to label accept

inc_ctr:
    mov prevValue, al       ;move al to prevValue 

    inc counter             ;inc_ctr counter
    jmp accept              ;jump to label accept 

hexAccept:    
    mov bl,prevValue        ;move prevValue to bl
    mov hexa, bl            ;move bl to hexa
    mov bl, 0               ;move 0 to bl

    mov ah, 09h             ;load and display the string hexmsg
    lea dx, hexmsg
    int 21h 

    mov bl,hexa             ;move hexa to bl
    ;mov octal, bl          ;move bl to octal
     xor bx, bx             ;clear bx

    mov bh, 240             ;move 240 to bh
    and bh, hexa            ;multiply hexa with bh
    mov bl, 15              ;move 15 to bl 
    and bl, hexa            ;multiply hexa with bl

    mov cl, 4               ;move 4 to cl
    rol bh, cl              ;rotate bh 4x

    cmp bh, 9               ;compare bh with 9
    jg Letters              ;jump to Letters if bh>9
    add bh, 48              ;add 48 to bh
    mov ah, 02h             ;set the output function
    mov dl, bh              ;move bh to dl
    int 21h                 ;print the character
    jmp Second_digit        ;jump to Second_digit

Letters:
    add bh, 55              ;add 55 to bh

    mov ah, 02h             ;set the output function
    mov dl, bh              ;move bh to dl
    int 21h                 ;print the character

Second_digit:       
    cmp bl, 9               ;compare bl with 9
    jg dispSecond_digit       ;jump to dispSecond_digit if bl>9
    add bl, 48              ;add 48 to bl
    mov ah, 02h             ;set the outputfunction
    mov dl, bl              ;move bl to dl
    int 21h                 ;print the character
    jmp terminate           ;jump to convertTooctall

dispSecond_digit:
    add bl, 55              ;add 55 ot bl
    mov ah, 02h             ;set the output function
    mov dl, bl              ;move bl to dl
    int 21h                 ;print the character

terminate:

    mov ah, 04ch            ;return control to DOS
    int 21h