三角形的画法

image.png

  1. .triangle-up {
  2. width: 0px;
  3. height: 0px;
  4. border-left: 50px solid transparent;
  5. border-right: 50px solid transparent;
  6. border-bottom: 100px solid yellowgreen;
  7. }

image.png

  1. .triangle-down {
  2. width: 0px;
  3. height: 0px;
  4. border-top: 100px solid yellowgreen;
  5. border-left: 50px solid transparent;
  6. border-right: 50px solid transparent;
  7. }

image.png

  1. .triangle-left {
  2. width: 0px;
  3. height: 0px;
  4. border-top: 50px solid transparent;
  5. border-right: 100px solid yellowgreen;
  6. border-bottom: 50px solid transparent;
  7. }
  8. <div class="triangle-left"></div>

image.png

  1. .triangle-topleft {
  2. width: 0;
  3. height: 0;
  4. border-top: 100px solid yellowgreen;
  5. border-right: 100px solid transparent;
  6. }

image.png

  1. .triangle-bottomright {
  2. width: 0;
  3. height: 0;
  4. border-bottom: 100px solid yellowgreen;
  5. border-left: 100px solid transparent;
  6. }

弹窗划出

  1. .pdrawer_wrap {
  2. position: fixed;
  3. z-index: 98;
  4. box-sizing: border-box;
  5. top: 50px;
  6. left: -1200px;
  7. bottom: 0;
  8. width: 820px;
  9. background-color: #fff;
  10. transition: all 0.4s cubic-bezier(0, 0, 0.2, 1);
  11. box-shadow: 0px 4px 12px 0px rgba(192, 195, 204, 0.34);
  12. }
  13. .active {
  14. transition-delay: 0.15s;
  15. left: 280px;
  16. }
  17. <div class="pdrawer_wrap"></div>
  18. $(function () {
  19. $("button").on("click", function () {
  20. $(".pdrawer_wrap").toggleClass("active");
  21. });
  22. });