Day #8 of Learning in Public
Form

Day #8 of Learning in Public

Today I learned how to add form and do custom animations as per your choice.

Used focus and placeholders in #sass.

Below is the reference code attached.

.form {
 &__group:not(:last-child) {
  margin-bottom: 2rem;
 }
 &__input {
  font-size: 1.5rem;
  font-family: inherit;
  color: inherit;
  padding: 1.5rem 2rem;
  border-radius: 2px;
  background-color: rgba($color: #f8f7f7, $alpha: 0.5);
  border: none;
  border-bottom: 2px solid transparent;
  width: 85%;
  display: block;
  &:focus {
   outline: none;
   box-shadow: 0 1rem rgba($color: gray, $alpha: 0.1);
   border-bottom: 2px solid green;
   background-color: rgba($color: gray, $alpha: 0.1);
  }
  &:focus:invalid {
   border-bottom: 2px solid orange;
  }
  &::-webkit-input-placeholder {
   color: gray;
  }
 }
 &__label {
  font-size: 1.2rem;
  font-weight: 700;
  margin-left: 2rem;
  margin-top: 0.7rem;
  display: block;
  transition: all 0.3s;
 }
 &__input:placeholder-shown + &__label {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4rem);
 }
}          

要查看或添加评论,请登录

Pratik Kumar Jaiswal的更多文章

  • Day 25 Learning In Public

    Day 25 Learning In Public

    Day 25: Explored the power of React Query and utilized Tanstack to optimize data fetching and state management in React…

    1 条评论
  • Day 23 :Learning In Public

    Day 23 :Learning In Public

    "Unlocking React's Potential: A Deep Dive into the Callback Hook" Mastered the Callback Hook in React today, a powerful…

    1 条评论
  • Day #17 of Learning in Public

    Day #17 of Learning in Public

    In today's project, I unveiled "Marvel Assemble," a dynamic carousel webpage born from HTML, CSS, and JavaScript…

  • DAY #16 of Learning In Public

    DAY #16 of Learning In Public

    Today's creative Endeavor resulted in : A tranquil meditation page crafted with HTML, CSS, and JavaScript. The soothing…

  • DAY #14 OF LEARNING IN PUBLIC

    DAY #14 OF LEARNING IN PUBLIC

    Affordigo Day 14: Explored the CSS property, a pivotal tool in creating versatile, multi-line layouts within flex…

  • Day #13 of Learning In Public

    Day #13 of Learning In Public

    Day 13: Today's exploration led me to the intriguing realm of the CSS property. Discovering how to modify and animate…

    2 条评论
  • Day 12: Today, I delved into the fundamentals of setting up a project.

    Day 12: Today, I delved into the fundamentals of setting up a project.

    Learning the essentials of project structuring, media queries, and responsive design principles has been pivotal. It's…

    2 条评论
  • Save your preloader spinner

    Save your preloader spinner

    codepen link provided below Loader Spinner Follow me Pratik Kumar Jaiswal for more!!! ?? ??#html #css #javascript…

  • Day #10 of Learning In Public

    Day #10 of Learning In Public

    Day 10: Diving into the world of Sass, I harnessed the versatility of , , and properties to create dynamic layouts…

  • Day #9 of Learning in Public.

    Day #9 of Learning in Public.

    A productive day exploring the power of in CSS for layering elements and mastering linear hover effects. These skills…

    1 条评论

社区洞察

其他会员也浏览了