简体   繁体   English

Visual Studio代码HTML建议不起作用

[英]Visual studio code html suggestion not working

body{
    background-image:url(asd.jpg);
    background-repeat: no-repeat;
    background-position: ;
}

after i write background-po ,it suggests background-position: 在我写了background-po ,它建议background-position:

I press 'Enter', but then it no longer suggests background-position to me. 我按Enter键,但是它不再向我建议background-position What could I do next without pressing CTRL + Space , can anyone tell me how it can do this automatically please? 在不按CTRL + Space情况下我该怎么办,请问有人可以自动执行此操作吗?

I'm learning HTML & CSS and these suggestions will help me a lot 我正在学习HTML和CSS,这些建议对我有很大帮助

To add to dippas ' answer, you can also use keywords together, like top left , or center center for example. 要添加到dippas的答案中,您还可以一起使用关键字,例如top leftcenter center

To get the prompt from your code-editor (this depends on the code editor though), when it suggests background-position , press the 'End' key or Tab key BEFORE pressing return (on a windows keyboard). 要从您的代码编辑器获取提示(尽管这取决于代码编辑器),当提示background-position ,请在按回车键之前(在Windows键盘上)按“结束”键或Tab键。

I hope this helps, but I agree with dippas, you should get to know the allowed values, it will save you time in the long run. 我希望这会有所帮助,但我同意dippas的观点,您应该了解允许的值,从长远来看,它将节省您的时间。

I work on VS Code, and what you describe seems like a poor user experience to me. 我从事VS Code的工作,您的描述对我来说似乎是糟糕的用户体验。 We should automatically show value suggestions after you accept a property name suggestion. 接受属性名称建议后,我们应该自动显示价值建议。

I've opened an issue to track this. 我已经打开了一个跟踪此问题的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM