gpt4 book ai didi

Center image and Left/Right for next/previous images using predefined pages(使用预定义页面将图像居中并向左/向右显示下一张/上一张图像)

转载 作者:bug小助手 更新时间:2023-10-28 11:35:13 24 4
gpt4 key购买 nike



I want to add a large < and > either on both sides of image or centered below image without changing the image location or size of image and having those lead off to the next/previous image with just an "a href"

我想要在图像的两侧或图像下方居中添加一个大的<和>,而不更改图像的位置或大小,并让它们引导到下一个/上一个图像,只有一个href


This is what I am starting with, tried multiple suggestions on here but none of them worked.

这就是我要开始的,在这里尝试了多种建议,但都没有奏效。


<html style="height: 100%;">
<head>
<meta name="viewport" content="width=device-width, minimum-scale=0.1">
<title>bb2.jpg (640×480)</title>
</head>
<body style="margin: 0px; height: 100%; background-color: rgb(14, 14, 14);">
<img style="display: block;-webkit-user-select: none;margin: auto;background-color: hsl(0, 0%, 90%);transition: background-color 300ms;" src="images/bb2.jpg">
</body>
</html>

更多回答

First, an <a> element is for navigation, rather than performing actions, so I’d suggest using a <button> element instead. Secondly, you say you’ve "* tried multiple suggestions on here*" - so, which ones, what happened? What went wrong? "…but none of them worked" - what does that mean, specifically? Where did they fail, what didn’t work, what broke, what were you expecting to happen?

首先,元素用于导航,而不是执行操作,因此我建议使用

I tried about 20-30 ideas, hey left the < > under image and would not center. Tried using the simple <center> but learned it was deprecated, tried styles on the links and no luck, CSS suggestion in head still left both bottom left. Not much "broke" it but could not center with suggestions, sorry do not remember all the things I tried, they did not work, tried to play with them with no luck then just moved on to another suggestion. Just tried buttons with a div class=flex-parent jc-center, that just killed the page even though it was showing as working in an example with other things above.

我尝试了大约20-30个想法,嘿,离开了<>下面的图像,不会居中。尝试使用简单的

,但发现它已被弃用,尝试了链接上的样式,但没有成功,Head中的css建议仍然位于左下角。没有太多“破坏”它,但不能集中在建议,对不起,我不记得所有的事情我尝试,他们不起作用,试图玩他们没有运气,然后只是转移到另一个建议。我刚刚尝试了带有div class=flex-parent jc-center的按钮,这只会杀死页面,尽管它在上面的示例中显示为可以工作。

So the arrows link to different pages, it's not a carousel? If that's the case then I misunderstood your use-case, and <a> elements are correct. But you do need to show your attempts, ideally as a running snippet in your question (see: "I've been told to create a runnable snippet," over on Meta Stack Overflow). As a personal request, and because it makes everybody's life easier, could you separate the inline-styles from the HTML and use a stylesheet, or <style> element?

所以箭头链接到不同的页面,这不是旋转木马?如果是这样,那么我误解了您的用例,元素是正确的。但您确实需要显示您的尝试,理想情况下是作为您的问题中的运行片段(参见Meta Stack Overflow上的“我被告知创建一个可运行的代码片段”)。作为个人要求,并且因为它使每个人的生活变得更容易,您可以将内联样式从HTML中分离出来并使用样式表或