我的主题使用以下代码生成我的img产品组合:
-(void)handleLongPress:(UILongPressGestureRecognizer *)gestureRecognizer
{
p = [gestureRecognizer locationInView:self.collection_view];
NSIndexPath *indexPath = [self.collection_view indexPathForItemAtPoint:p];
//Other Stuff
//show the done button here
navButtonDone = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStylePlain target:self action:@selector(navBtnDone:)];
navButton.tag = indexPath.row //IMPORTANT
self.navigationItem.rightBarButtonItem = navButtonDone;
我找到了这段代码:
- (IBAction)navBtnDone:(id)sender
{
UIBarButtonItem *btn = (UIBarButtonItem *)sender;
UItableViewCell *cell = [myCollectionView cellForItemAtIndexPath: [NSIndexPath indexPathWithRow: btn.tag inSection:0]];
[cell.deleteButton removeFromSuperView];
}
我不擅长PHP,但我知道图片大小是从“$ image_big”生成的?
我在<img width="222" height="440" src="#" class="attachment-portfolio" alt="#">
<div class="carousel-inner">
<?php foreach($attachments as $attachment) {
$alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true);
$image_big = wp_get_attachment_image( $attachment->ID, 'portfolio' ); ?>
<div class="item">
<?php echo $image_big ?>
</div>
<?php } ?>
我尝试更改function.php
中的宽度和高度,但网站上没有任何内容!它仍然是add_image_size('big',9999,400);
我希望图像是100%或大约800px宽度(如果不可能得到%单位)。怎么办?