diff --git a/Card Show/Card show.png b/Card Show/Card show.png new file mode 100644 index 00000000..0aa9a5c1 Binary files /dev/null and b/Card Show/Card show.png differ diff --git a/Card Show/index.html b/Card Show/index.html new file mode 100644 index 00000000..a44781f0 --- /dev/null +++ b/Card Show/index.html @@ -0,0 +1,19 @@ + + + + + + Product Card with Focus + + + +
+ Product Image +
+

Product Name

+

This is a brief description of the product. It highlights key features and benefits.

+ +
+
+ + \ No newline at end of file diff --git a/Card Show/style.css b/Card Show/style.css new file mode 100644 index 00000000..cf94eb62 --- /dev/null +++ b/Card Show/style.css @@ -0,0 +1,109 @@ +body { + font-family: Arial, sans-serif; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + margin: 0; + background-color: #f0f0f0; + transition: background-color 0.3s ease; +} + +.card { + background-color: white; + border-radius: 8px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + overflow: hidden; + width: 300px; + transition: all 0.3s ease; + position: relative; + z-index: 1; + padding: 15px; +} + +.card:hover, .card:focus-within { + transform: translateY(-5px) scale(1.03); + box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15); + outline: none; +} + +.card:focus-within ~ .focus-overlay { + opacity: 1; + visibility: visible; +} + +.card-image { + width: 100%; + height: 200px; + object-fit: cover; +} + +.card-content { + padding: 20px; +} + +.card-title { + font-size: 1.5rem; + font-weight: bold; + margin: 0 0 10px 0; +} + +.card-description { + color: #666; + font-size: 0.9rem; + line-height: 1.4; + margin-bottom: 20px; +} + +.card-button { + background-color: #007bff; + border: none; + border-radius: 4px; + color: white; + cursor: pointer; + font-size: 1rem; + padding: 10px 20px; + transition: background-color 0.3s ease; +} + +.card-button:hover, .card-button:focus { + background-color: #0056b3; + outline: none; +} + +.card-button:focus { + box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5); +} + +.focus-overlay { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.5); + opacity: 0; + visibility: hidden; + transition: opacity 0.3s ease, visibility 0.3s ease; + z-index: 0; +} + +body::after { + content: ''; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(247, 0, 0, 0.5); + opacity: 0; + visibility: hidden; + transition: opacity 0.3s ease, visibility 0.3s ease; + z-index: 0; + pointer-events: none; +} + +body:focus-within::after { + opacity: 1; + visibility: visible; +} \ No newline at end of file diff --git a/README.md b/README.md index 26801e9e..c7b4070b 100644 --- a/README.md +++ b/README.md @@ -924,6 +924,15 @@ Please be aware that the demos may exhibit significant accessibility issues, suc **[⬆ back to top](#quick-links)** --- + +## Card SHow + +[] (https://codepen.io/Sp39/pen/gOEdpeq) + +**[⬆ back to top](#quick-links)** + +--- + ## Contributors Thanks to these wonderful people who have contributed to this project! diff --git a/index.html b/index.html index 861b959b..de15065c 100644 --- a/index.html +++ b/index.html @@ -372,6 +372,7 @@

You Dont Slideshow CSS Tables CSS Toggle + Card-Show Flex Property Grid Infinite Carousel @@ -485,19 +486,19 @@

You Dont