Anpassen der Preistabelle in Divi
Hier sind ein paar Optimierungen, die ich mir ausgedacht habe, damit wir hierfür kein weiteres Plug-In installieren müssen.
Da ich drei Tabellen verwenden werde, brauche ich etwas horizontalen Platz, daher verwende ich eine Spalte.
Nehmen wir nun an, Sie möchten ein wenig Abwechslung. Ändern Sie die Farben, die abgerundeten Ecken, Symbole anstelle von Aufzählungszeichen und die Schriftgrößen (insbesondere bei den enormen Preisklassen).
Hier kommen die Leistungsfähigkeit der benutzerdefinierten Klassen von Divi und die Magie von CSS ins Spiel.
Normalerweise isoliere ich als Erstes diesen bestimmten Abschnitt, damit meine Anpassung keine anderen Bereiche meiner Site durcheinander bringt, die möglicherweise denselben Code verwenden, wie z. B. Schaltflächen, Ecken und Aufzählungszeichen. Dazu öffne ich das Modul und füge eine eindeutige benutzerdefinierte Klasse hinzu.
In diesem Fall habe ich die folgende CSS-Klasse hinzugefügt
.Web-Preistabelle
Großartig. Jetzt können wir anfangen, etwas STIL hinzuzufügen ! Fügen Sie einfach den folgenden Code zu Ihrem benutzerdefinierten CSS-Feld in Ihrem Divi ePanel oder noch besser zu Ihrem Child-Theme- Stylesheet hinzu.
Beginnen wir mit der Änderung des Überschriftentextes.
CSS-1
1 2 3 |
.web-price-table .et_pb_pricing_heading h2 {color: #fff; font-size: 22px; font-weight: 900;} |
CSS-2
1 2 3 |
.web-price-table .et_pb_best_value {color: #fff; font-size: 14px; display: block; padding: 5px 10px; font-weight: 500;} |
CSS-3
1 2 3 4 |
.web-price-table .et_pb_pricing_heading {background-color: #1e73be;} .web-price-table .et_pb_featured_table .et_pb_pricing_heading {background-color: #178624;} |
CSS-4
1 2 3 4 5 |
.web-price-table .et_pb_sum {font-size: 30px;line-height: 0px;font-weight: 700;color: #4F545A !important;} .web-price-table .et_pb_sum p {padding:10px 0px;} .web-price-table .et_pb_pricing_content_top { border-bottom: 1px solid #ccc; padding: 8px;} |
CSS-5
1 2 3 |
.web-price-table .et_pb_featured_table {-webkit-box-shadow: 0px 0px 15px 5px rgba(157, 157, 160, 0.6); -moz-box-shadow: 0px 0px 15px 5px rgba(157, 157, 160, 0.6); box-shadow: 0px 0px 15px 5px rgba(157, 157, 160, 0.6);} |
CSS-6
1 2 3 |
.web-price-table .et_pb_pricing li {line-height: 16px;padding: 0 0 15px 14px;position: relative;} |
CSS-7
1 2 3 |
.web-price-table .et_pb_pricing_table_button {color: #fff !important; background: #1e73be;} |
CSS-8
1 2 3 4 5 6 7 8 9 10 11 12 13 |
.web-price-table .et_pb_pricing_heading h2 {color: #fff; font-size: 22px; font-weight: 900;} .web-price-table .et_pb_best_value {color: #fff; font-size: 14px; display: block; padding: 5px 10px; font-weight: 500;} .web-price-table .et_pb_pricing_heading {background-color: #1e73be;} .web-price-table .et_pb_featured_table .et_pb_pricing_heading {background-color: #178624;} .web-price-table .et_pb_sum {font-size: 30px;line-height: 0px;font-weight: 700;color: #4F545A !important;} .web-price-table .et_pb_sum p {padding:10px 0px;} .web-price-table .et_pb_pricing_content_top { border-bottom: 1px solid #ccc; padding: 8px;} .web-price-table .et_pb_featured_table {-webkit-box-shadow: 0px 0px 15px 5px rgba(157, 157, 160, 0.6); -moz-box-shadow: 0px 0px 15px 5px rgba(157, 157, 160, 0.6); box-shadow: 0px 0px 15px 5px rgba(157, 157, 160, 0.6);} .web-price-table .et_pb_pricing li {line-height: 16px;padding: 0 0 15px 14px;position: relative;} .web-price-table .et_pb_pricing_table_button {color: #fff !important; background: #1e73be;} |
Jetzt lasst uns etwas Spaß haben. Die Aufzählungszeichen sind langweilig. Ich wollte ein paar grüne Häkchen und ein paar rote x hinzufügen. Dazu musste ich die kleinen Symbole hochladen, die ich verwenden wollte.
Dann habe ich diesen Code hinzugefügt. Sie können die folgende URL durch den URL-Pfad Ihrer Bilder ersetzen.
CSS-9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
/*Change Bullets*/ .web-price-table .et_pb_pricing li:before { background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: url("https://quiroz.co/wp-content/uploads/2014/09/green-plus.png"); background-origin: padding-box; background-position: 0 0; background-repeat: no-repeat; background-size: 50% 50% !important; border: medium none transparent !important; color: transparent; height: 16px; margin-left: -1px; margin-top: -5px; width: 16px;} .web-price-table li.et_pb_not_available:before { background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: url("https://quiroz.co/wp-content/uploads/2014/09/red-x.png"); background-origin: padding-box; background-position: 0 0; background-repeat: no-repeat; background-size: 50% 50% !important; border: medium none transparent !important; color: transparent; height: 16px; margin-left: -1px; margin-top: -5px; width: 16px;} |
CSS-10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
/*Rounded Corners*/ .web-price-table .et_pb_pricing_table:nth-child(odd){ -webkit-border-top-left-radius:6px; -webkit-border-bottom-left-radius:6px; -moz-border-radius-topleft:6px; -moz-border-radius-bottomleft:6px; border-top-left-radius:6px; border-bottom-left-radius:6px;} .web-price-table .et_pb_pricing_table:nth-child(odd) .et_pb_pricing_heading{ -webkit-border-top-left-radius:4px; -moz-border-radius-topleft:4px; border-top-left-radius:4px;} .web-price-table .et_pb_pricing_table:nth-child(even){ -webkit-border-top-right-radius:6px; -webkit-border-bottom-right-radius:6px; -moz-border-radius-topright:6px; -moz-border-radius-bottomright:6px; border-top-right-radius:6px; border-bottom-right-radius:6px;} .web-price-table .et_pb_pricing_table:nth-child(even) .et_pb_pricing_heading{ -webkit-border-top-right-radius:4px; -moz-border-radius-topright:4px; border-top-right-radius:4px;} .web-price-table .et_pb_pricing_table{ -webkit-border-radius:6px; -moz-border-radius:6px; border-radius:6px;} .web-price-table .et_pb_pricing_heading, .web-price-table .et_pb_tab_active:first-child{ -webkit-border-top-left-radius:4px; -webkit-border-top-right-radius:4px; -moz-border-radius-topleft:4px; -moz-border-radius-topright:4px; border-top-left-radius:4px; border-top-right-radius:4px;} .web-price-table .et_pb_featured_table{ -webkit-border-radius:6px; -moz-border-radius:6px; border-radius:6px;} .web-price-table .et_pb_featured_table .et_pb_pricing_heading, .web-price-table .et_pb_tabs_controls, .web-price-table .et_pb_column_1_3 .et_pb_tab_active:first-child, .web-price-table .et_pb_column_1_4 .et_pb_tab_active:first-child { -webkit-border-top-left-radius:4px; -webkit-border-top-right-radius:4px; -moz-border-radius-topleft:4px; -moz-border-radius-topright:4px; border-top-left-radius:4px; border-top-right-radius:4px;} .web-price-table .et_pb_pricing_table:first-child { -webkit-border-top-left-radius:6px; -webkit-border-bottom-left-radius:6px; -moz-border-radius-topleft:6px; -moz-border-radius-bottomleft:6px; border-top-left-radius:6px; border-bottom-left-radius:6px;} .web-price-table .et_pb_pricing_table:first-child .et_pb_pricing_heading, .web-price-table .et_pb_tab_active:first-child{ -webkit-border-top-left-radius:4px; -moz-border-radius-topleft:4px; border-top-left-radius:4px;} .web-price-table .et_pb_pricing_table:last-child { -webkit-border-top-right-radius:6px; -webkit-border-bottom-right-radius:6px; -moz-border-radius-topright:6px; -moz-border-radius-bottomright:6px; border-top-right-radius:6px; border-bottom-right-radius:6px;} |
Okay, vielleicht nicht das Schönste, aber zumindest hat es mir Spaß gemacht 😉
Sie müssen „ .web-price-table “ durch die CSS-Klasse ersetzen, nach der Sie diesen Abschnitt benannt haben.