Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ページのレイアウト(2段、1段、複数段)を変更したいのですが、body要素のクラスやIDを変更するだけでは、一定の制約があり、やりながら感じました。誰かが前にそれを実装しましたか? ベストプラクティスはありますか??
body クラスまたは ID をその親要素で定義します...たとえば、「wrap1」や「wrap2」などの ID をスタイルする必要があります...したがって、同様に実装できます...
body#wrap1 .container { // Your Style } body#wrap2 .container { // Your Style }
レイアウトが十分に複雑でない場合は、列による除算の場合、単純にフローティング css を使用します...