我的图片根本没有显示(My image does not show at all)
我从数据库中提取我的图像,然后在我的页面上显示它,但它不显示。 要确认从数据库中调用图像,我在标题上输出图像名称=当您将鼠标放在看不见的图像上时,您可以看到图像名称,但图像本身根本不显示。 该网站是这样的: http : //clicktravelnstay.com/desti_list.php?details = 19
<div id="imgdisplay"> <div class="pagecontainer"> <div class="galleryCredit">Hotel Photos</div> <div class="galleryType">Preview</div> <div class="clear_both"></div> <div class="galleryContent"> <!--image goes herewidth:650px; height:300px;--> <!--This is Where the wide image and the caption icon will be placed--> <div class="galleryThumbnail"> <?php $query = "SELECT * FROM image WHERE hotel_id = {$hotel['hotel_id']}"; $image_set = mysql_query($query,$connection); while($image = mysql_fetch_array($image_set)){?> <a href=\"img/photos/<?php $image['image_url'];?>" title="<?php echo $image['image_url']?>"> <img src="img/photos/<?php echo $image['image_url'];?>" width="75" height="75"/></a> <?php } ?> <div class="clear_both"></div> </div> <div class="galleryPreview"> </div> <div class="clear_both"></div> <div class="clear_both"></div> <div class="gallery_preload_area"></div> </div> <!--image goes herewidth:650px; height:300px;--> </div>
以下代码是图库的Jquery代码。
$(document).ready(function(){ $(".galleryThumbnail a").click(function(e){ e.preventDefault(); //update thumbnail $(".galleryThumbnail a").removeClass("selected"); $(".galleryThumbnail a").children().css("opacity","1"); $(this).addClass("selected"); $(this).children().css("opacity",".4"); //setup thumbnails var photoCaption = $(this).attr('title'); var photofullsize =$(this).attr('href'); $(".galleryPreview").fadeOut(500, function(){ $(".gallery_preload_area").html("") // this is what is going to happen after the fadeout $(".galleryPreview").html("<a href='"+ photofullsize +"' style=' background-image:url("+photofullsize+");'></a>"); $(".galleryCaption").html("<p><a href='"+photofullsize+"' title='Click to view large'>View Large</a></p><p></p>") $(".galleryPreview").fadeIn(500); }); }); });
I am pulling my image from the database to display it on my page however it wont show. to confirm that the image is being called from the database i output the image name on the title= when you place the mouse on the unseen image you can see the image name but the image itself does not show at all. the website is this: http://clicktravelnstay.com/desti_list.php?details=19
<div id="imgdisplay"> <div class="pagecontainer"> <div class="galleryCredit">Hotel Photos</div> <div class="galleryType">Preview</div> <div class="clear_both"></div> <div class="galleryContent"> <!--image goes herewidth:650px; height:300px;--> <!--This is Where the wide image and the caption icon will be placed--> <div class="galleryThumbnail"> <?php $query = "SELECT * FROM image WHERE hotel_id = {$hotel['hotel_id']}"; $image_set = mysql_query($query,$connection); while($image = mysql_fetch_array($image_set)){?> <a href=\"img/photos/<?php $image['image_url'];?>" title="<?php echo $image['image_url']?>"> <img src="img/photos/<?php echo $image['image_url'];?>" width="75" height="75"/></a> <?php } ?> <div class="clear_both"></div> </div> <div class="galleryPreview"> </div> <div class="clear_both"></div> <div class="clear_both"></div> <div class="gallery_preload_area"></div> </div> <!--image goes herewidth:650px; height:300px;--> </div>
The following code is the Jquery code for the image gallery.
$(document).ready(function(){ $(".galleryThumbnail a").click(function(e){ e.preventDefault(); //update thumbnail $(".galleryThumbnail a").removeClass("selected"); $(".galleryThumbnail a").children().css("opacity","1"); $(this).addClass("selected"); $(this).children().css("opacity",".4"); //setup thumbnails var photoCaption = $(this).attr('title'); var photofullsize =$(this).attr('href'); $(".galleryPreview").fadeOut(500, function(){ $(".gallery_preload_area").html("") // this is what is going to happen after the fadeout $(".galleryPreview").html("<a href='"+ photofullsize +"' style=' background-image:url("+photofullsize+");'></a>"); $(".galleryCaption").html("<p><a href='"+photofullsize+"' title='Click to view large'>View Large</a></p><p></p>") $(".galleryPreview").fadeIn(500); }); }); });
原文:https://stackoverflow.com/questions/11916346
最满意答案
Mouse.OverrideCursor方法允许您为整个应用程序设置光标。
The Mouse.OverrideCursor method allows you to set the cursor for the entire application.
相关问答
更多-
正如@Kami提到的,我必须在我的.CUR文件中应用与此线程中提到的相同的逻辑,并且它工作正常。 As @Kami mentioned, I had to apply the same logic mentioned in this thread on my .CUR file and it worked.
-
我建议尽可能使用Preview *事件进行视觉更改,因为它会使您的逻辑很好地分开。 此外,最好(IMHO)使用Mouse.OverrideCursor属性临时更改光标。 例如: void Window_Loaded(object sender, RoutedEventArgs e) { // ... button1.PreviewMouseLeftButtonDown += Button1_PreviewMouseLeftButtonDown; button1.PreviewMous ...
-
如何使用鼠标光标在屏幕上最大化WPF窗口?(How can I make a WPF window maximized on the screen with the mouse cursor?)[2022-09-26]
您可以在XAML中进行设置 -
在WPF当在层次结构中声明控件并且properties被覆盖时, Cursor会产生问题。 如果您严格要在控件中设置Cursor ,请使用FrameworkElement类的ForceCursor属性。 句法:
Fill me in! ... -
为了实现此目的,您必须更改注册表值然后执行API调用,请查看此MSDN帖子以获取有关如何执行此操作的更多详细信息: 如何使用Visual C#.NET更改系统的光标? 另请查看此链接: 用C#更改全局鼠标光标或光标方案? In order to accomplish this you have to change a registry value then perform an API call, check this MSDN post for more details on how to do it: ...
-
你不需要JavaScript。 你可以使用CSS: #sortable li { cursor:move; } 这里sortable的元素是你可以sortable的元素, li是可sortable的元素。 在这里演示。 You don't need JavaScript for that. You can use CSS: #sortable li { cursor:move; } Here sortable is the element you've made sortable and li are ...
-
您可以使用start事件。 $("#data").draggable({ start: function(event, ui) { if ($(this).css('cursor') === 'auto') { //replace "auto" event.preventDefault(); } } }); 我在这里创造了一个工作小提琴。 我希望这有帮助。 You can make use of the start event. $("#data").dragga ...
-
用这个: var query = new ManagementObjectSearcher("SELECT * FROM Win32_Printer"); var printers = query.Get(); string printerName = "Printer to set as default" ; foreach(ManagementObject printer in printers) { if (printer["name"].ToString() == printerName ...
-
通常,您需要覆盖OnSetCursor() ,如果鼠标位于您想要特定光标的位置,则调用SetCursor()并返回TRUE以便DefWindowProc不会将其重置为默认箭头。 Usually, you need to override OnSetCursor(), and there, if the mouse is in a place where you want a specific cursor, you call SetCursor() and return TRUE so that DefWi ...
-
如何更改整个WPF应用程序的默认鼠标光标?(How to change default mouse cursor for the whole WPF application globally?)[2021-10-05]
Mouse.OverrideCursor方法允许您为整个应用程序设置光标。 The Mouse.OverrideCursor method allows you to set the cursor for the entire application.