這是前端挑戰 v24.09.04 的提交,Glam Up My Markup: Space
但這也是前端挑戰 v24.09.04,CSS 藝術:空間的提交。
我建造了什麼
我已經建立了所提供標記的不可讀版本,看起來就像太空中的外星訊號。這就是為什麼這是一次雙重提交——它也適用於 CSS 藝術挑戰賽?
旅行
破壞任何設計的一個有趣方法是使用:
* { display: contents }
這“刪除了父節點”,因此如果將其新增至節點的所有子節點,則基本上沒有標籤,只有原始內容。
在我們開始之前,讓我們為 body 添加一些基本樣式:
body { aspect-ratio: 1 / 1; background: radial-gradient(circle at center, #1d2a30 40%, #0B1215 75%, #111); container-type: inline-size; display: grid; margin: 0; width: 100vw;
我們設定一個正方形(長寬比)作為網格,具有放射狀背景。
接下來,我們設定子元素:
:is(footer, header, section) { * { display: contents; } font-size: 3cqi; grid-area: 1 / 1; height: 25cqi; overflow: hidden; place-content: center; place-self: center; text-align: center; width: 80cqi; }
我們使用「網格堆疊」技術將所有子元素放置在同一個網格單元中。
這給了我們:
真是一團糟!現在,讓我們加入旋轉和顏色:
footer { rotate: 300deg; color: #FFFD; } header { color: #FFFA; } section { &:nth-of-type(1) { rotate: 60deg; color: #FFF4; } &:nth-of-type(2) { rotate: 120deg; color: #FFF9; } &:nth-of-type(3) { rotate: 180deg; color: #FFFE; } &:nth-of-type(4) { rotate: 240deg; color: #FFF7; } }
現在我們得到:
快到了!我們需要做的就是加入一個奇怪的字體和一個搖晃的動畫:
@import url('https://fonts.googleapis.com/css2? family=Redacted+Script&display=swap'); @keyframes shake { 0% { transform: skewY(-15deg); } 1% { transform: skewY(15deg); } 2% { transform: skewY(-15deg); } 3% { transform: skewY(15deg); } 4%, 100% { transform: skewY(0deg); translate: 0; } 5% { translate: -100vw -50vw; } 6% { translate: 100vw 50vw; } 7% { translate: 0; } }
示範
以上是外星訊號的詳細內容。更多資訊請關注PHP中文網其他相關文章!

是的,youshouldlearnbothflexboxandgrid.1)flexboxisidealforone-demensional,flexiblelayoutslikenavigationmenus.2)gridexcelstcelsintwo-dimensional,confffferDesignssignssuchasmagagazineLayouts.3)blosebothenHancesSunHanceSlineHancesLayOutflexibilitibilitibilitibilitibilityAnderibilitibilityAndresponScormentilial anderingStruction

重構自己的代碼看起來是什麼樣的?約翰·瑞亞(John Rhea)挑選了他寫的一個舊的CSS動畫,並介紹了優化它的思維過程。

CSSanimationsarenotinherentlyhardbutrequirepracticeandunderstandingofCSSpropertiesandtimingfunctions.1)Startwithsimpleanimationslikescalingabuttononhoverusingkeyframes.2)Useeasingfunctionslikecubic-bezierfornaturaleffects,suchasabounceanimation.3)For

@keyframesispopularduetoitsversatoryand and powerincreatingsmoothcsssanimations.keytricksinclude:1)definingsmoothtransitionsbetnestates,2)使用AnimatingMultatingMultationMultationProperPertiessimultane,3)使用使用4)使用BombingeNtibalibility,4)使用CombanningWiThjavoFofofofoftofofo

CSSCOUNTERSAREDOMANAGEAUTOMANAMBERINGINWEBDESIGNS.1)他們可以使用forterablesofcontents,ListItems,and customnumbering.2)AdvancedsincludenestednumberingSystems.3)挑戰挑戰InclassINCludeBrowsEccerCerceribaliblesibility andperformiballibility andperformissises.4)創造性

使用滾動陰影,尤其是對於移動設備,是克里斯以前涵蓋的一個微妙的UX。傑夫(Geoff)涵蓋了一種使用動畫限制屬性的新方法。這是另一種方式。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

SAP NetWeaver Server Adapter for Eclipse
將Eclipse與SAP NetWeaver應用伺服器整合。

記事本++7.3.1
好用且免費的程式碼編輯器

EditPlus 中文破解版
體積小,語法高亮,不支援程式碼提示功能

MinGW - Minimalist GNU for Windows
這個專案正在遷移到osdn.net/projects/mingw的過程中,你可以繼續在那裡關注我們。 MinGW:GNU編譯器集合(GCC)的本機Windows移植版本,可自由分發的導入函式庫和用於建置本機Windows應用程式的頭檔;包括對MSVC執行時間的擴展,以支援C99功能。 MinGW的所有軟體都可以在64位元Windows平台上運作。

ZendStudio 13.5.1 Mac
強大的PHP整合開發環境