TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

It's 2020 and I'm using image maps

213 点作者 sunnylemon将近 5 年前

25 条评论

Acconut将近 5 年前
The author seems to be have written this post based on work for an in-browser video editor (<a href="https:&#x2F;&#x2F;videoinu.com&#x2F;editor" rel="nofollow">https:&#x2F;&#x2F;videoinu.com&#x2F;editor</a>). It runs completely on the client-side, so all the editing, previewing, rendering, and exporting is done using web technologies. Of course, it&#x27;s not comparable to a professional editing tools but nevertheless that&#x27;s very impressive achievement in my opinion!
评论 #23246624 未加载
Pmop将近 5 年前
&gt; To make matters even more exciting, the last two coordinates might not be what you&#x27;d expect; when absolutely positioning items in CSS, right and bottom indicate the distance from the right and bottom edges respectively. In image maps, this holds no water. Instead, both horizontal coordinates are counted from the left edge and vertical coordinates from the top edge.<p>Interesting. This order is commonly used by libraries like SDL and SFML to declare rectangular shapes.
评论 #23245060 未加载
评论 #23245506 未加载
评论 #23244753 未加载
评论 #23244936 未加载
评论 #23246150 未加载
评论 #23245774 未加载
评论 #23245741 未加载
at_a_remove将近 5 年前
It&#x27;s funny this came up. I&#x27;ve been doing webstuff and getting paid for it since about 1996 or 1997; imagemaps were a pretty big deal back then. Recently, I found myself thinking, &quot;How do they do that these days?&quot; I have gotten out of the webbish stuff and even before that, I tended to stick to the tried and true.<p>I don&#x27;t think the need for something very much <i>like</i> imagemaps will ever go away. The lure of arbitrary polygons and paths cut from an image needing to be clickable is high, and I think the ability to join up a bunch of polygonal (or worse) images and have them well-aligned is far off. It&#x27;s easier to cut up than to re-align.
评论 #23250206 未加载
评论 #23247242 未加载
kevsim将近 5 年前
I feel like I&#x27;m missing something. It seems like declare a &lt;map&gt; element, associate it with an &lt;img&gt;, but then use JS to iterate over the map and build a bunch of absolutely positioned &lt;div&gt; elements on top of the image. Why not just have the annotations stored outside the DOM (returned by API or whatever) and just build the absolutely positioned &lt;div&gt; elements? Wouldn&#x27;t that avoid the fighting with funky coordinate systems, etc.?<p>I get why &lt;map&gt; is (was?) useful in general, but if you&#x27;re going to do your own annotation rendering on top anyway, it just seems odd. Fun exercise though!
评论 #23244679 未加载
tech-historian将近 5 年前
I&#x27;m reminded of the first image map I ever saw -- Microsoft&#x27;s 1994 homepage:<p><a href="https:&#x2F;&#x2F;www.versionmuseum.com&#x2F;images&#x2F;websites&#x2F;microsoft-website&#x2F;microsoft-website%5E1994%5Ehomepage.gif" rel="nofollow">https:&#x2F;&#x2F;www.versionmuseum.com&#x2F;images&#x2F;websites&#x2F;microsoft-webs...</a>
评论 #23247191 未加载
dillonmckay将近 5 年前
I still use this on one of the Wordpress sites I maintain.<p>The client insisted on an actual tree for the landing page, and clickable circles as ‘fruit’ for each of the navigational choices.<p>But, yes, I remember doing this in the late 90s.<p>We still have animated GIFs, too.
prakhunov将近 5 年前
This brings me back to the time of when I used Photoshop 5 to create the entire website design and layout, create slices, and export to HTML which was then by edited by Dreamweaver.
评论 #23247450 未加载
Minor49er将近 5 年前
Image maps were great. I used them for a site&#x27;s nav that needed some slight visual flair (item entries had to be diplayed at a slight angle with a custom font). To reduce the bandwidth, the entire nav&#x27;s text was a single image with transparency. Then the backing would be either a red or green angled rectangle. The text had a mapping over it that would change the background rectangle depending on what area you hovered. It made for a great effect.
rikroots将近 5 年前
I used to love image maps: really useful for adding hotlinks and hover effects to images. Sadly they can&#x27;t deal with the modern responsive web - though there exist some Wordpress plugins to help overcome that issue.<p>This CSS article[1] goes into details about alternative approaches. It mainly seems to be SVG, or CSS clip paths. I&#x27;ve used (and like) SVG; CSS clip paths are foreign territory to me - has anyone used them in production to replicate image map functionality?<p>One of the goals I made for myself when developing my canvas library[2] was to bring image-map-like functionality to the &lt;canvas&gt; element - but as responsive and accessible as I could make it. It&#x27;s still a work-in-progress but I&#x27;m getting there!<p>[1] - <a href="https:&#x2F;&#x2F;css-tricks.com&#x2F;the-many-ways-to-link-up-shapes-and-images-with-html-and-css&#x2F;" rel="nofollow">https:&#x2F;&#x2F;css-tricks.com&#x2F;the-many-ways-to-link-up-shapes-and-i...</a><p>[1] Scrawl-canvas - <a href="https:&#x2F;&#x2F;scrawl-v8.rikweb.org.uk&#x2F;" rel="nofollow">https:&#x2F;&#x2F;scrawl-v8.rikweb.org.uk&#x2F;</a>
评论 #23248222 未加载
评论 #23255937 未加载
jtwaleson将近 5 年前
Wow, blast from the past. I remembered building a website using image maps 13 years ago. Just checked and it&#x27;s still being used even though I stopped being the webmaster 12 years ago, works great! Never realized it was considered obsolete even then.
29athrowaway将近 5 年前
90s starter pack: Framesets, image maps, marquees, blink, guestbooks, visit counters, &quot;under construction&quot;, &quot;webmaster&quot;, tiled backgrounds.<p>The weirdest: MIDI music on autoplay, VRML.
评论 #23250951 未加载
tyingq将近 5 年前
Pretty clever use of old tech. I think I probably would have tried embedding the raster image in an svg[1], then overlay shapes for hover or click events.<p>[1] <a href="https:&#x2F;&#x2F;css-tricks.com&#x2F;lodge&#x2F;svg&#x2F;31-can-put-raster-images-svg&#x2F;" rel="nofollow">https:&#x2F;&#x2F;css-tricks.com&#x2F;lodge&#x2F;svg&#x2F;31-can-put-raster-images-sv...</a>
bryanrasmussen将近 5 年前
I have considered recently I should make some things with imagemaps again, like there is untapped potential there I&#x27;m not clear of but that when I start working with it years of experience and new technologies will clarify.
评论 #23244479 未加载
michaelmior将近 5 年前
&gt; we&#x27;ll be revisiting this opinion once responsive websites with their (gasp) automatically resizing images are out of fashion.<p>Will this ever happen? We won&#x27;t stop having radically differently sized devices any time soon. Of course I&#x27;m sure eventually the &quot;responsive&quot; approach will give way to other techniques but I can&#x27;t really see the high-level approach disappearing.
max23_将近 5 年前
On a side note, LINE Messaging API support sending image map message[0] where you can have multiple tappable areas.<p>[0] <a href="https:&#x2F;&#x2F;developers.line.biz&#x2F;en&#x2F;reference&#x2F;messaging-api&#x2F;#imagemap-message" rel="nofollow">https:&#x2F;&#x2F;developers.line.biz&#x2F;en&#x2F;reference&#x2F;messaging-api&#x2F;#imag...</a>
skocznymroczny将近 5 年前
I still use tables for layouting because divs and messing with positioning&#x2F;floating never really clicked for me.
评论 #23244412 未加载
评论 #23244555 未加载
评论 #23261505 未加载
评论 #23244404 未加载
hawski将近 5 年前
This reminds me of a benchmark of sorts, that gave a ratio of the size of a whole size to the size of its image rendered as JPEG. One could think of a map overlay to bring back some interactivity.<p>Does anyone remember it? It was once featured on HN, but I can&#x27;t find it now.
评论 #23251608 未加载
fny将近 5 年前
I last used these in 2014 for a mobile web app that tracked muscle soreness. Worked like a charm, and I was also able to handle responsiveness with viewport aware JavaScript. I had to dig up an old copy of Fireworks to generate the polygons easily too.
dmitryminkovsky将近 5 年前
Was just thinking of using an image map the other day! My dad has a camera collection and it would be cool to take a picture of it and then map prices of the picture to links about each camera. Haven’t gotten their yet though.
wilsonrocks将近 5 年前
I&#x27;m now curious as to whether you could animate the image map along with what it displayed to make some sort of game.<p>With a JS animation library if the actual css properties aren&#x27;t animatable
meerita将近 5 年前
To me looks like it&#x27;s fun to develop but impractical to use. Today you can go cleaner and scalable with css-grid, flex and other proper HTML elements. It was a nice article though
egfx将近 5 年前
interesting mentions of the &lt;blink&gt; and &lt;marquee&gt; tags. I have a modern app that makes use of these properties for making gif&#x27;s. blink will make any content in the gif flash on the canvas and marquee will move it side to side : <a href="https:&#x2F;&#x2F;imgur.com&#x2F;rgHrsoa" rel="nofollow">https:&#x2F;&#x2F;imgur.com&#x2F;rgHrsoa</a>
评论 #23244696 未加载
taf2将近 5 年前
I feel like canvas tag plus image maps work really well together
评论 #23246443 未加载
wired_devil将近 5 年前
And it is fine! This website uses table for layout, so...
turnipla将近 5 年前
And that’s a bad idea.<p>HTML images maps are not responsive. Just use SVG, it works without any scripts and it resizes with the image.<p>If you use &lt;foreignObject&gt; you can also use a fully responsive &lt;picture&gt; tag
评论 #23251260 未加载