Il background-image di una pagina web su Ipad da molti problemi: apparentemente non funzionano i repeat-x e repeat-y e assolutamente non funziona il background-attachment:fixed.
La soluzione per mettere un immagine di background fisso sta nel metterla come immagine con uno z-index a -1 e mettere l'immagine fixed (questa viene accettata).
<img src="<?php echo get_template_directory_uri(); ?>/img/back_big.jpg" id="backipad" />
dove:
#backipad {
position: fixed;
top: 0;
left: 0;
width: 100%;
min-width: 1024px;
z-index:-1;
}
venerdì 21 dicembre 2012
martedì 11 dicembre 2012
Immagini su wordpress
1) Per prendere tutte le immagini che sono nella gallery di riferimento al post.
<?php
// print_r($post);
//$aaa= catch_that_image();
$x=0;
$args = array(
'orderby' => 'menu_order',
'post_type' => 'attachment',
'post_parent' => get_the_ID(),
'post_mime_type' => 'image',
'post_status' => null,
'numberposts' => -1,
);
$attachments = get_posts($args);
?>
<?php // if ($attachments) : ?>
<?php foreach ($attachments as $attachment) : ?>
<?php
$src = wp_get_attachment_image_src( $attachment->ID, 'large');
if(is_singular())
$src = wp_get_attachment_image_src( $attachment->ID, 'single-thumb');
endforeach;
?>
<?php
// print_r($post);
//$aaa= catch_that_image();
$x=0;
$args = array(
'orderby' => 'menu_order',
'post_type' => 'attachment',
'post_parent' => get_the_ID(),
'post_mime_type' => 'image',
'post_status' => null,
'numberposts' => -1,
);
$attachments = get_posts($args);
?>
<?php // if ($attachments) : ?>
<?php foreach ($attachments as $attachment) : ?>
<?php
$src = wp_get_attachment_image_src( $attachment->ID, 'large');
if(is_singular())
$src = wp_get_attachment_image_src( $attachment->ID, 'single-thumb');
endforeach;
?>
Iscriviti a:
Post (Atom)