틀:반응형 화살표: 두 판 사이의 차이
편집 요약 없음
편집 요약 없음 |
편집 요약 없음 |
||
| 1번째 줄: | 1번째 줄: | ||
<includeonly><onlyinclude>{{#switch: {{{direction|}}} | <includeonly><onlyinclude><div class="" style="display: flex;position: relative; | ||
|right|left|#default = | {{#switch: {{{direction|}}} | ||
| right|left|#default = | |||
min-height: {{#expr: {{#if:{{{tip-length|}}}|{{{tip-length}}}|48}}*sin({{#if:{{{tip-deg|}}}|{{{tip-deg}}}|30}}*pi/180)+{{#if:{{{thick|}}}|{{{thick}}}|5}}}}px; | |||
{{#if:{{{length|}}}|width: {{{length}}}px;}} | {{#if:{{{length|}}}|width: {{{length}}}px;}} | ||
min- | | up|down = | ||
min-width: {{#expr: {{#if:{{{tip-length|}}}|{{{tip-length}}}|48}}*sin({{#if:{{{tip-deg|}}}|{{{tip-deg}}}|30}}*pi/180)+{{#if:{{{thick|}}}|{{{thick}}}|5}}}}px; | |||
height: {{#if:{{{length|}}}|{{{length}}}|100}}px; | |||
}}{{#switch: {{{direction|}}} | |||
|left|#default= | |||
align-items: {{#switch: {{{tip-direction|}}}|right|#default = flex-end|left=flex-start}}; | |||
|right= | |||
align-items: {{#switch: {{{tip-direction|}}}|right|#default = flex-start|left=flex-end}}; | |||
|up= | |||
justify-content: {{#switch: {{{tip-direction|}}}|right|#default = flex-start|left=flex-end}}; | |||
|down= | |||
justify-content: {{#switch: {{{tip-direction|}}}|right|#default = flex-end|left=flex-start}}; | |||
}}"><div class="arrow-shaft" style="background: {{#if:{{{color|}}}|{{{color}}}|black}}; border-radius: 100px; | |||
{{#switch: {{{direction|}}} | |||
|right|left|#default= | |||
width: 100%; height: calc({{#if:{{{thick|}}}|{{{thick}}}|5}}*2px); | width: 100%; height: calc({{#if:{{{thick|}}}|{{{thick}}}|5}}*2px); | ||
|up|down= | |||
width: calc({{#if:{{{thick|}}}|{{{thick}}}|5}}*2px); height: 100%; | |||
}}"></div><div class="arrow-tip" style=" | |||
background: {{#if:{{{color|}}}|{{{color}}}|black}}; | background: {{#if:{{{color|}}}|{{{color}}}|black}}; | ||
border-radius: 100px; | border-radius: 100px; | ||
width: {{#if:{{{tip-length|}}}|{{{tip-length}}}|48}}px; height: calc({{#if:{{{thick|}}}|{{{thick}}}|5}}*2px); | |||
{{#switch: {{{direction|}}} | |||
|right = | |||
rotate: calc({{#ifeq: {{{tip-direction|}}}|left|+|-}}{{#if:{{{deg|}}}|{{{deg}}}|30}}deg); | rotate: calc({{#ifeq: {{{tip-direction|}}}|left|+|-}}{{#if:{{{deg|}}}|{{{deg}}}|30}}deg); | ||
transform-origin: {{#expr: | transform-origin: {{#expr: {{#if:{{{tip-length|}}}|{{{tip-length}}}|48}} - {{#if:{{{thick|}}}|{{{thick}}}|5}}}}px 50%; | ||
right: 0; | |||
|left|#default = | |||
rotate: calc({{#ifeq: {{{tip-direction|}}}|left|+|-}}{{#if:{{{deg|}}}|{{{deg}}}|30}}deg); | |||
transform-origin: {{#if:{{{thick|}}}|{{{thick}}}|5}}px 50%; | |||
left: 0; | |||
|up= | |||
rotate: {{#expr: {{#ifeq: {{{tip-direction|}}}|left|-90+|+90-}}{{#if:{{{deg|}}}|{{{deg}}}|30}}}}deg; | |||
transform-origin: {{#expr: {{#ifeq: {{{tip-direction|}}}|left|{{#if:{{{tip-length|}}}|{{{tip-length}}}|48}} - }}{{#if:{{{thick|}}}|{{{thick}}}|5}}}}px 50%; | |||
top: 0; | |||
|down= | |||
rotate: {{#expr: {{#ifeq: {{{tip-direction|}}}|left|-90+|+90-}}{{#if:{{{deg|}}}|{{{deg}}}|30}}}}deg; | rotate: {{#expr: {{#ifeq: {{{tip-direction|}}}|left|-90+|+90-}}{{#if:{{{deg|}}}|{{{deg}}}|30}}}}deg; | ||
transform-origin: {{#expr: | transform-origin: {{#expr: {{#ifeq: {{{tip-direction|}}}|right|{{#if:{{{tip-length|}}}|{{{tip-length}}}|48}} - }}{{#if:{{{thick|}}}|{{{thick}}}|5}}}}px 50%; | ||
bottom: 0; | |||
}}"></div></div></onlyinclude></includeonly> | |||
}}{{#if:{{{thick|}}}|{{{thick}}}|5}}}}px 50%; | |||
화면 너비에 따라 반응하는 화살표 틀. | 화면 너비에 따라 반응하는 화살표 틀. | ||
{| class="wikitable" | {| class="wikitable" | ||