Convert Figma logo to code with AI

chokcoco logoCSS-Inspiration

CSS Inspiration,在这里找到写 CSS 的灵感!

10,236
955
10,236
372

Top Related Projects

HTML/CSS drawing in the style of an 18th-century oil painting. Hand-coded entirely in HTML & CSS.

1,738

CSS loading animations with minimal effort!

CSS is powerful, you can do a lot of things without JS.

⚡️ A collection of tips to help take your CSS skills pro 🦾

29,203

A collection of CSS3 powered hover effects to be applied to links, buttons, logos, SVG, featured images and so on. Easily apply to your own elements, modify or just use for inspiration. Available in CSS, Sass, and LESS.

High-level guidelines for writing manageable, maintainable CSS

Quick Overview

CSS-Inspiration is a GitHub repository that serves as a collection of CSS effects, animations, and creative designs. It showcases various CSS techniques and tricks, providing developers with inspiration and practical examples for enhancing web designs and user interfaces.

Pros

  • Extensive collection of CSS effects and animations
  • Well-organized with categorized examples
  • Includes both simple and complex CSS techniques
  • Regularly updated with new content

Cons

  • Primarily in Chinese, which may be a barrier for non-Chinese speakers
  • Some examples may not be fully optimized for cross-browser compatibility
  • Lacks detailed explanations for more complex techniques
  • May require additional JavaScript for certain effects

Code Examples

  1. Creating a gradient text effect:
.gradient-text {
  background-image: linear-gradient(to right, #ff8a00, #e52e71);
  -webkit-background-clip: text;
  color: transparent;
}
  1. Implementing a hover effect with pseudo-elements:
.hover-effect {
  position: relative;
  overflow: hidden;
}

.hover-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  transition: 0.5s;
}

.hover-effect:hover::before {
  left: 100%;
}
  1. Creating a parallax scrolling effect:
.parallax {
  background-image: url('background.jpg');
  height: 100vh;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

Getting Started

To use the CSS effects from CSS-Inspiration:

  1. Browse the repository at https://github.com/chokcoco/CSS-Inspiration
  2. Find an effect you want to implement
  3. Copy the relevant CSS code
  4. Paste the CSS into your project's stylesheet
  5. Add the corresponding HTML structure to your markup
  6. Adjust the CSS as needed to fit your design

Example:

<div class="gradient-text">Gradient Text Effect</div>
.gradient-text {
  background-image: linear-gradient(to right, #ff8a00, #e52e71);
  -webkit-background-clip: text;
  color: transparent;
  font-size: 2em;
  font-weight: bold;
}

Competitor Comparisons

HTML/CSS drawing in the style of an 18th-century oil painting. Hand-coded entirely in HTML & CSS.

Pros of purecss-francine

  • Showcases an impressive single, complex CSS artwork
  • Demonstrates advanced CSS techniques in a cohesive project
  • Provides a unique, visually striking example of pure CSS capabilities

Cons of purecss-francine

  • Limited to a single artwork, less diverse than CSS-Inspiration
  • May be less practical for learning everyday CSS techniques
  • Lacks explanations or tutorials for the techniques used

Code Comparison

purecss-francine:

.hair-back {
  width: 180px;
  height: 300px;
  border-radius: 0 0 100px 100px;
  background: #111;
  margin-left: -90px;
  position: absolute;
  z-index: 3;
}

CSS-Inspiration:

.gradient-border {
  --borderWidth: 3px;
  background: #1D1F20;
  position: relative;
  border-radius: var(--borderWidth);
}

purecss-francine focuses on creating complex shapes and structures for a specific artwork, while CSS-Inspiration provides more general-purpose CSS techniques that can be applied to various projects. CSS-Inspiration offers a wider range of examples and explanations, making it more suitable for learning and reference. However, purecss-francine showcases the extreme possibilities of CSS in a visually impressive manner.

1,738

CSS loading animations with minimal effort!

Pros of Whirl

  • Focuses specifically on loading animations and spinners
  • Provides a wide variety of pre-built, customizable loading animations
  • Includes a live demo page for easy visualization and selection

Cons of Whirl

  • Limited to loading animations, less diverse than CSS-Inspiration
  • Fewer examples overall compared to CSS-Inspiration
  • Less detailed explanations of the CSS techniques used

Code Comparison

CSS-Inspiration example (3D text effect):

.text-3d {
  text-transform: uppercase;
  font-size: 6em;
  color: #f2f2f2;
  text-shadow: 1px 1px 1px #919191,
      1px 2px 1px #919191,
      1px 3px 1px #919191;
}

Whirl example (Simple spinner):

.whirl:after {
  content: "\0020";
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 6px solid #fff;
  border-color: #fff transparent #fff transparent;
  animation: whirl 1.5s linear infinite;
}

Both repositories offer valuable CSS resources, with CSS-Inspiration providing a broader range of effects and techniques, while Whirl specializes in loading animations. CSS-Inspiration tends to offer more detailed explanations, making it better for learning, while Whirl excels in providing ready-to-use loading spinners for quick implementation in projects.

CSS is powerful, you can do a lot of things without JS.

Pros of You-Dont-Need-JavaScript

  • Focuses specifically on replacing JavaScript functionality with CSS, providing clear alternatives
  • Includes practical examples for common UI components and interactions
  • Encourages better performance and accessibility by reducing reliance on JavaScript

Cons of You-Dont-Need-JavaScript

  • Limited scope compared to CSS-Inspiration, which covers a broader range of CSS techniques
  • May not cover more complex interactions that genuinely require JavaScript
  • Less frequently updated, potentially missing newer CSS capabilities

Code Comparison

CSS-Inspiration example (3D text effect):

.text-3d {
  text-shadow: 1px 1px #999, 2px 2px #888, 3px 3px #777, 4px 4px #666;
}

You-Dont-Need-JavaScript example (accordion without JS):

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.accordion-input:checked ~ .accordion-content {
  max-height: 1000px;
}

Both repositories offer valuable CSS techniques, but with different focuses. CSS-Inspiration provides a wide array of creative CSS effects and layouts, while You-Dont-Need-JavaScript specifically targets replacing JavaScript functionality with CSS. The choice between them depends on whether you're looking for general CSS inspiration or ways to reduce JavaScript usage in your projects.

⚡️ A collection of tips to help take your CSS skills pro 🦾

Pros of css-protips

  • More comprehensive coverage of CSS best practices and techniques
  • Better organized with clear categories and explanations
  • Regularly updated with new tips and community contributions

Cons of css-protips

  • Lacks visual examples for many tips
  • Focuses more on general CSS tips rather than creative inspiration
  • May be overwhelming for beginners due to the large number of tips

Code Comparison

CSS-Inspiration example (creative animation):

.gradient-animation {
  background: linear-gradient(45deg, #f3ec78, #af4261);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

css-protips example (practical tip):

.truncate {
  width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

CSS-Inspiration focuses on creative and visually appealing CSS techniques, often showcasing complex animations and effects. In contrast, css-protips provides practical tips and best practices for everyday CSS usage, covering a wide range of topics from layout to performance optimization.

While CSS-Inspiration is excellent for finding inspiration and learning advanced CSS techniques, css-protips is more suitable for developers looking to improve their overall CSS skills and coding practices. Both repositories complement each other well, offering different perspectives on CSS development.

29,203

A collection of CSS3 powered hover effects to be applied to links, buttons, logos, SVG, featured images and so on. Easily apply to your own elements, modify or just use for inspiration. Available in CSS, Sass, and LESS.

Pros of Hover

  • Focused specifically on hover effects, providing a comprehensive collection
  • Includes a CSS-only solution, making it lightweight and easy to implement
  • Well-documented with clear examples and usage instructions

Cons of Hover

  • Limited to hover effects, lacking variety in other CSS techniques
  • Less frequently updated compared to CSS-Inspiration
  • Smaller community and fewer contributors

Code Comparison

CSS-Inspiration example (3D text effect):

.text-3d {
  text-transform: uppercase;
  font-size: 6em;
  color: #f2f2f2;
  text-shadow: 1px 1px 1px #919191,
      1px 2px 1px #919191,
      1px 3px 1px #919191;
}

Hover example (2D Rotate):

.hvr-rotate {
  display: inline-block;
  vertical-align: middle;
  -webkit-transform: perspective(1px) translateZ(0);
  transform: perspective(1px) translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
}

Both repositories offer valuable CSS resources, with CSS-Inspiration providing a broader range of techniques and Hover focusing specifically on hover effects. CSS-Inspiration tends to showcase more complex and diverse examples, while Hover offers a streamlined collection of hover-specific styles. The choice between the two depends on the specific needs of the project and the desired range of CSS effects.

High-level guidelines for writing manageable, maintainable CSS

Pros of CSS-Guidelines

  • Comprehensive guide for writing scalable and maintainable CSS
  • Focuses on best practices and coding standards
  • Provides clear explanations and rationale for each guideline

Cons of CSS-Guidelines

  • Less visual examples compared to CSS-Inspiration
  • May be overwhelming for beginners due to its depth
  • Lacks interactive demos or live code examples

Code Comparison

CSS-Guidelines example:

.c-button {
  display: inline-block;
  padding: 1em 2em;
  background-color: #4a90e2;
  color: #fff;
}

CSS-Inspiration example:

.gradient-text {
  background: linear-gradient(to right, #ff0000, #00ff00);
  -webkit-background-clip: text;
  color: transparent;
}

CSS-Guidelines focuses on structural and naming conventions, while CSS-Inspiration showcases creative visual effects. CSS-Guidelines provides a solid foundation for writing maintainable CSS, whereas CSS-Inspiration offers inspiration for unique designs and animations. CSS-Guidelines is better suited for teams and large projects, while CSS-Inspiration is ideal for designers and developers looking to enhance their creative CSS skills.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

logo2.png

这里可以让你寻找到使用或者是学习 CSS 的灵感,以分类的形式,展示不同 CSS 属性或者不同的课题使用 CSS 来解决的各种方法。

在线预览

Online Pages

布局(Layout)

阴影(box-shadow、drop-shadow)

伪类/伪元素

滤镜(fliter)

边框

背景/渐变(linear-gradient/radial-gradient/conic-gradient)

混合模式(mix-blend-mode/background-blend-mode)

3D

动画/过渡(transition/animation)

clip-path

文本类

综合

CSS-Doodle

svg