Добавить новую кнопку в шапку сайта
Добавляю вот такую кнопку в файл prostore.user_css
input.button4 { position: relative; display: inline-block; font-family: Arial,Helvetica,FreeSans,"Liberation Sans","Nimbus Sans L",sans-serif; font-size: 1.5em; font-weight: 700; color: rgb(245,245,245); text-shadow: 0 -1px rgba(0,0,0,.1); text-decoration: none; user-select: none; padding: .3em 1em; outline: none; border: none; border-radius: 3px; background: #0c9c0d linear-gradient(#82d18d, #0c9c0d); box-shadow: inset #72de26 0 -1px 1px, inset 0 1px 1px #98ff98, #3caa3c 0 0 0 1px, rgba(0,0,0,.3) 0 2px 5px; -webkit-animation: pulsate 1.2s linear infinite; animation: pulsate 1.2s linear infinite; } input.button4:hover { -webkit-animation-play-state: paused; animation-play-state: paused; cursor: pointer; } input.button4:active { top: 1px; color: #fff; text-shadow: 0 -1px rgba(0,0,0,.3), 0 0 5px #ffd, 0 0 8px #fff; box-shadow: 0 -1px 3px rgba(0,0,0,.3), 0 1px 1px #fff, inset 0 1px 2px rgba(0,0,0,.8), inset 0 -1px 0 rgba(0,0,0,.05); } @-webkit-keyframes pulsate { 50% {color: #fff; text-shadow: 0 -1px rgba(0,0,0,.3), 0 0 5px #ffd, 0 0 8px #fff;} } @keyframes pulsate { 50% {color: #fff; text-shadow: 0 -1px rgba(0,0,0,.3), 0 0 5px #ffd, 0 0 8px #fff;} }
Не работает.. а добавляю вот такую, работает :
.knopka01 { display: inline-block; width: 100px; height: 50px; line-height: 50px; font-size: 20px; text-align: center; text-decoration: none; text-shadow: 0 1px rgba(255,255,255,.2), 0 -1px rgba(0,0,0,.8); outline: none; border: none; border-radius: 100px; background: rgb(28,107,114) radial-gradient(150% 100% at 50% 5px, rgba(255,255,255,.2), rgba(0,0,0,0)); box-shadow: inset rgba(0,0,0,.6) 0 -2px 5px, inset rgba(252,255,255,.7) 0 2px 5px, rgba(0,0,0,.8) 0 2px 5px -1px; color: rgb(0,79,86); user-select: none; } .knopka01:hover { color: rgb(0,59,66); cursor: pointer; } .knopka01:active { padding-bottom: 1px; box-shadow: inset rgba(0,0,0,1) 0 1px 3px, inset rgba(0,0,0,.6) 0 -2px 5px, inset rgba(252,255,255,.7) 0 2px 5px, 0 1px rgba(255,255,255,.08); color: rgb(128,207,214); }
Как мне добавить верхнюю?
Добавить ответ
Здравствуйте, Михаил!
Оберните ваш код тегами {literal} {/literal}
В первом коде есть фрагменты, в которых символы идут сразу за {фигурной скобкой}.
Такой код шаблонизатор smarty расценивает как свои операторы и выдаёт ошибку.
Либо добавьте пробелы после открывающей фигурной скобки, либо оберните код тегами {literal}.
Все равно не получается.. Можете показать на примере первой кнопки как правильно обернуть тегами?
Все равно никак:(
Здравствуйте, Михаил!
Код на ваш сайт добавлен корректно.
Но если у вас нет тега <input class="button4">, то действие этого кода вы не увидите.
Т.к. код применим только тегу <input> с присвоенным ему классом button4.
А если добавляете код для класса .knopka01 и в теме есть любой тег, например такой <a href="#" class="knopka01">, то css код будет работать.