Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

apply-a-conditional-border-without-moving-element.md

Latest commit

 

History

History
18 lines (14 loc) · 507 Bytes

apply-a-conditional-border-without-moving-element.md

File metadata and controls

18 lines (14 loc) · 507 Bytes

When you allow a user's behavior to add or remove a border from an element,that can cause the page to 'jump around' as the border is added or removed. Acommon example is a border around an element that is 'selected'.

Fix this issue by adding a transparent border around the element and giving itcolor when it's selected. No more jumps.

.element {border:1pxsolidtransparent;}.selectedElement {border-color:$selected-color;}

[8]ページ先頭

©2009-2025 Movatter.jp