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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Tell HN: For developers ChatGPT results are incredible better than Google

5 点作者 out_sider超过 2 年前
AI is something I should know more about, I need to take some serious time to learn it and do a small side project to really understand it, but meanwhile I&#x27;ve started using chatGPT and I just keep getting amazed by how much better the results are compared to google (programming wise).<p>Just a small example that left me speechless, I wanted a simple thing, keep an &lt;image&gt; element with the height always equal to the width (basically a square) but didn&#x27;t want to use &quot;px&quot; so it would scale correctly (% or view port dimensions).<p>I just asked to chatGPT &quot;how can I keep an image height always equal to its width in css ?&quot; and the answer was:<p>&quot;To keep an image&#x27;s height always equal to its width in CSS, you can use the padding-bottom property to set the height of the image as a percentage of its width.&quot;<p>And it worked flawlessly because &quot;The size of the padding as a percentage, relative to the inline size (width in a horizontal language, defined by writing-mode) of the containing block. Must be nonnegative.&quot;<p>I should have known this but I didn&#x27;t and when I tried this in Google I had to check several pages with not as good solutions like &quot;just make the px count the same, i.e: 400px vs 400px&quot; until I reached w3school ratio explanation with padding-bottom.<p>I just wanted to share this small example that really helped me and might be useful for others.<p>PS: For anyone reading this, have a nice Christmas and if you don&#x27;t celebrate Christmas I hope you enjoy your festivities.

1 comment

hacky_engineer超过 2 年前
Thanks for the tip! Everyone&#x27;s been complaining about google recently about how the results are all just SEO garbage now. I could easily see ChatGPT become the goto for asking programming questions.
评论 #34016832 未加载