离子选择颜色输入 [英] Ionic select input of colours
问题描述
我正在尝试添加颜色的选择输入。我想要添加为选项的颜色如下:
您可以在
https://forum.ionicframework.com/t/ionic-select-list-option-with-flag-image/90972/10
git存储库是: https://github.com/ketanyekale / ionic-color-and-image-selector
I am trying to add a select input of colours. The colours that I want to add as options are the following: http://ionicframework.com/docs/components/#header How can I write the select so that when the user selects a colour, he sees the option as the colour and not as the name of colour?
This is what I have now, it is acceptable when running in browser but when I run from phone, the background colour is not visible and the user only sees the name of the colour:
<select ng-model="category.colour" required> <option selected style="background-color: white" class="light">light</option> <option style="background-color: cornsilk" class="stable">stable</option> <option style="background-color: DodgerBlue " class="positive">positive</option> <option style="background-color: aqua" class="calm">calm</option> <option style="background-color: YellowGreen" class="balanced">balanced</option> <option style="background-color: Gold" class="energized">energized</option> <option style="background-color: Crimson " class="assertive">assertive</option> <option style="background-color: BlueViolet " class="royal">royal</option> <option style="background-color: black" class="dark">dark</option> </select>
I've implemented color and image selector with the latest version of ionic and using ion-select.
You can read a brief explanation at https://forum.ionicframework.com/t/ionic-select-list-option-with-flag-image/90972/10
The git repository is: https://github.com/ketanyekale/ionic-color-and-image-selector
这篇关于离子选择颜色输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!