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个想法,嘿,离开了<>下面的图像,不会居中。尝试使用简单的
I am simply trying to come up with a way to add the next and previous to a page that does not have it. CSS has gotten so complex, just trying to do something that use to be EXTREEEEEMLY easy back in 2000. Now its like pulling teeth cause I have no idea what CSS could screw with others. I was trying to leave their page as is and add the links/buttons. Starting to realize why they likely did not bother.
我只是试图想出一种方法,将下一页和上一页添加到没有它的页面。Css已经变得如此复杂,只是试图做一些在2000年时曾经很容易的事情。现在,这就像拔牙一样,因为我不知道css可以和其他人做什么。我试图让他们的页面保持原样,并添加链接/按钮。开始意识到为什么他们可能不会费心。
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中分离出来并使用样式表或