PHP . SU
Программирование на PHP, MySQL и другие веб-технологии
Без описания
Поиск в теме | Версия для печати
au_23
Отправлено: 28 Октября, 2015 - 17:13:58
Новичок
Покинул форум
Сообщений всего: 18
Дата рег-ции: Март 2013
Помог: 0 раз(а)
PHP:
скопировать код в буфер обмена
. wrapper {
height: 670px;
margin: 40px auto 0 ;
position: relative;
width: 500px;
}
. slider {
height: inherit;
overflow: hidden;
position: relative;
width: inherit;
- webkit- box- shadow: 0 0 20px rgba( 0, 0, 0, . 5) ;
- moz- box- shadow: 0 0 20px rgba( 0, 0, 0, . 5) ;
- o- box- shadow: 0 0 20px rgba( 0, 0, 0, . 5) ;
box- shadow: 0 0 20px rgba( 0, 0, 0, . 5) ;
}
. slides {
height: 670px;
opacity: 0 ;
position: absolute;
width: 500px;
z- index: 0 ;
- webkit- transform: scale( 1. 5) ;
- moz- transform: scale( 1. 5) ;
- o- transform: scale( 1. 5) ;
transform: scale( 1. 5) ;
- webkit- transition: transform ease- in- out . 5s, opacity ease- in- out . 5s;
- moz- transition: transform ease- in- out . 5s, opacity ease- in- out . 5s;
- o- transition: transform ease- in- out . 5s, opacity ease- in- out . 5s;
transition: transform ease- in- out . 5s, opacity ease- in- out . 5s;
}
. wrapper > input {
display: none;
}
. wrapper . controls {
left: 43%;
margin- left: - 220px;
position: absolute;
}
а это куда поместить, извините за глупый вопрос..?
au_23
Отправлено: 29 Октября, 2015 - 09:27:58
Новичок
Покинул форум
Сообщений всего: 18
Дата рег-ции: Март 2013
Помог: 0 раз(а)
andrewkard пишет: сюда <?PHP $style = '.class{}; '; ?>
<?PHP $style = '.class{};'; ?>
результат
Parse error: syntax error, unexpected ''; ' (T_CONSTANT_ENCAPSED_STRING)
я правильно понимаю
<?PHP $style = '.class{
.link a {
display: block;
text-align: center;
height: 100%;
}
};'; ?>
(Отредактировано автором: 29 Октября, 2015 - 09:30:06)
au_23
Отправлено: 29 Октября, 2015 - 10:01:10
Новичок
Покинул форум
Сообщений всего: 18
Дата рег-ции: Март 2013
Помог: 0 раз(а)
CODE (
htmlphp ):
скопировать код в буфер обмена
<? php
$str = 60 ;
$style = '
{
margin: 0;
padding: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
}
body {
}
.wrapper {
height: 670px;
margin: 40px auto 0;
position: relative;
width: 500px;
}
.slider {
height: inherit;
overflow: hidden;
position: relative;
width: inherit;
-webkit-box-shadow: 0 0 20px rgba(0, 0, 0, .5);
-moz-box-shadow: 0 0 20px rgba(0, 0, 0, .5);
-o-box-shadow: 0 0 20px rgba(0, 0, 0, .5);
box-shadow: 0 0 20px rgba(0, 0, 0, .5);
}
.slides {
height: 670px;
opacity: 0;
position: absolute;
width: 500px;
z-index: 0;
-webkit-transform: scale(1.5);
-moz-transform: scale(1.5);
-o-transform: scale(1.5);
transform: scale(1.5);
-webkit-transition: transform ease-in-out .5s, opacity ease-in-out .5s;
-moz-transition: transform ease-in-out .5s, opacity ease-in-out .5s;
-o-transition: transform ease-in-out .5s, opacity ease-in-out .5s;
transition: transform ease-in-out .5s, opacity ease-in-out .5s;
}
.wrapper > input {
display: none;
}
.wrapper .controls {
left: 43%;
margin-left: -220px;
position: absolute;
}
.wrapper label {
cursor: pointer;
display: inline-block;
height: 20px;
margin: 25px 2px 0 2px;
position: relative;
width: 20px;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
-webkit-transition: background ease-in-out .5s;
-moz-transition: background ease-in-out .5s;
-o-transition: background ease-in-out .5s;
transition: background ease-in-out .5s;
}
.wrapper label: after {
border: 1px solid #ddd;
content: ' ';
display: block;
height: 23px;
left: -2px;
position: absolute;
top: -2px;
width: 23px;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
}
.link {
width: 500px;
height: 670px;
}
.link a {
display: block;
text-align: center;
height: 100%;
}
a{
text-decoration: none;
}
' ;
$x = 0 ;
while ( $x < $str )
{
$x ++;
echo ".slide" . $x . " { background-image: url(book14/m" . $x . ".jpg); }" ;
echo "
#slide" . $x . ":checked ~ .slider > .slide" . $x . "
{
opacity: 1;
z-index: 1;
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
" ;
echo ".wrapper label:hover,#slide" . $x . "1:checked ~ .controls label:nth-of-type(" . $x . "),
{
background: #ddd;
}
" ;
}
echo "</style>" ;
echo "<center><br><b><a href='http://chl.kiev.ua/Default.aspx?id=7221'>Книга памяті мого роду</A><br></B>" ;
echo "<div class=wrapper>" ;
$f = 0 ;
while ( $f < $str )
{
if ( $f == 1) {
$b = 'radio CHECKED name=point>' ;
}
else {
$b = 'radio name=point>' ;
}
echo "<input id=slide" . $f . " type=" . $b ;
$f ++;
} ;
echo "<div class=slider>" ;
$y = 0 ;
while ( $y < $str )
{
$y ++;
echo "<div class='slides slide" . $y . " link'><a href='book14/" . $y . ".jpg'></A></DIV>" ;
}
echo "</div>" ;
echo "<div class=controls>" ;
$u = 0 ;
while ( $u < $str )
{
$u ++;
echo "<label for=slide" . $u . ">" . $u . "</LABEL>" ;
}
echo "</div></div></center>" ;
?>
всеравно ошибка
(Добавление)
Parse error: syntax error, unexpected ''; ' (T_CONSTANT_ENCAPSED_STRING) in /1/5.php on line 106
по этому листингу в 107(Отредактировано автором: 29 Октября, 2015 - 10:04:34)
au_23
Отправлено: 29 Октября, 2015 - 10:40:37
Новичок
Покинул форум
Сообщений всего: 18
Дата рег-ции: Март 2013
Помог: 0 раз(а)
alnik-75 пишет: кавычки смотри
что в кавычках проблема я понял.... а что за проблема не понятно )))
alnik-75
Отправлено: 29 Октября, 2015 - 11:56:05
Посетитель
Покинул форум
Сообщений всего: 338
Дата рег-ции: Сент. 2012
Откуда: Гродно, Беларусь
Помог: 0 раз(а)
au_23 пишет: alnik-75 пишет: кавычки смотри
что в кавычках проблема я понял.... а что за проблема не понятно )))
значение переменной в двойные кавычки заключи
(Отредактировано автором: 29 Октября, 2015 - 11:57:50)
au_23
Отправлено: 29 Октября, 2015 - 13:46:21
Новичок
Покинул форум
Сообщений всего: 18
Дата рег-ции: Март 2013
Помог: 0 раз(а)
alnik-75 пишет: au_23 пишет: alnik-75 пишет: кавычки смотри
что в кавычках проблема я понял.... а что за проблема не понятно )))
значение переменной в двойные кавычки заключи
к сожалению моему.... не работает...
Faraon-san
Отправлено: 29 Октября, 2015 - 14:49:34
Посетитель
Покинул форум
Сообщений всего: 318
Дата рег-ции: Сент. 2013
Помог: 8 раз(а)
PHP:
скопировать код в буфер обмена
$style = "
{
margin: 0;
padding: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
}
body {
}
.wrapper {
height: 670px;
margin: 40px auto 0;
position: relative;
width: 500px;
}
.slider {
height: inherit;
overflow: hidden;
position: relative;
width: inherit;
-webkit-box-shadow: 0 0 20px rgba(0, 0, 0, .5);
-moz-box-shadow: 0 0 20px rgba(0, 0, 0, .5);
-o-box-shadow: 0 0 20px rgba(0, 0, 0, .5);
box-shadow: 0 0 20px rgba(0, 0, 0, .5);
}
.slides {
height: 670px;
opacity: 0;
position: absolute;
width: 500px;
z-index: 0;
-webkit-transform: scale(1.5);
-moz-transform: scale(1.5);
-o-transform: scale(1.5);
transform: scale(1.5);
-webkit-transition: transform ease-in-out .5s, opacity ease-in-out .5s;
-moz-transition: transform ease-in-out .5s, opacity ease-in-out .5s;
-o-transition: transform ease-in-out .5s, opacity ease-in-out .5s;
transition: transform ease-in-out .5s, opacity ease-in-out .5s;
}
.wrapper > input {
display: none;
}
.wrapper .controls {
left: 43%;
margin-left: -220px;
position: absolute;
}
.wrapper label {
cursor: pointer;
display: inline-block;
height: 20px;
margin: 25px 2px 0 2px;
position: relative;
width: 20px;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
-webkit-transition: background ease-in-out .5s;
-moz-transition: background ease-in-out .5s;
-o-transition: background ease-in-out .5s;
transition: background ease-in-out .5s;
}
.wrapper label: after {
border: 1px solid #ddd;
content: ' ';
display: block;
height: 23px;
left: -2px;
position: absolute;
top: -2px;
width: 23px;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
}
.link {
width: 500px;
height: 670px;
}
.link a {
display: block;
text-align: center;
height: 100%;
}
a{
text-decoration: none;
}
" ;
au_23
Отправлено: 29 Октября, 2015 - 15:11:15
Новичок
Покинул форум
Сообщений всего: 18
Дата рег-ции: Март 2013
Помог: 0 раз(а)
там должно быть
CODE (
htmlphp ):
скопировать код в буфер обмена
* {
margin: 0 ;
padding: 0 ;
- webkit- box- sizing: border- box;
- moz- box- sizing: border- box;
- o- box- sizing: border- box;
box- sizing: border- box;
}
Спасибо за замечание но проблема не в этом месте
сейчас трабл тут
CODE (
htmlphp ):
скопировать код в буфер обмена
. wrapper label: after {
border: 1px solid #ddd;
content: ' ' ;
display: block;
height: 23px;
left: - 2px;
position: absolute;
top: - 2px;
width: 23px;
- webkit- border- radius: 50%;
- moz- border- radius: 50%;
- o- border- radius: 50%;
border- radius: 50%;
}
Поиск в теме | Версия для печати
Страниц (1): [1]
Сейчас эту тему просматривают: 0 (гостей: 0, зарегистрированных: 0)
« Вопросы новичков »
Все гости форума могут просматривать этот раздел. Только зарегистрированные пользователи могут создавать новые темы в этом разделе. Только зарегистрированные пользователи могут отвечать на сообщения в этом разделе.
Powered by ExBB FM 1.0 RC1. InvisionExBB