简体   繁体   English

如何在 android 上的 html 文件中使用我的 css 文件?

[英]How can i use my css file in my html file on android?

I created a html website with css on my computer and it works pefect on it.我在我的电脑上用 css 创建了一个 html 网站,它在上面运行得很完美。 But i wanted it to work on android too, so i created a folder and just moved the files in it.但我希望它也能在 android 上运行,所以我创建了一个文件夹并移动了其中的文件。 As i opened the html file, the css file didn't work.当我打开 html 文件时,css 文件不起作用。

<html lang="en" dir="ltr">
  <head>
    <link rel="stylesheet" type="text/css" href="style.css" media="screen">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="description" content="Home">
    <meta name="keywords" content="Home">
    <meta name="author" content="Censored">
    <title>Home</title>
  </head>

An image from the html & css files folder来自 html 和 css 文件文件夹的图像

The webview approach should work, but it means you'll have to write up an app for every scenario. webview 方法应该可行,但这意味着您必须为每个场景编写一个应用程序。

Load HTML file into WebView 将 HTML 文件加载到 WebView

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

相关问题 我如何使用.apk文件到我自己的应用程序android中? - how can i use .apk file into my own application android? Android:如何使用我的文件 - Android:how use to my file 如何在我的 Android 清单文件中组织我的布局 - How can I organize my layouts in my Android manifest file 如何从另一个文件使用文件中的对象(Android Studio) - how I can use object in my file from another file (Android Studio) 我可以添加自己的.xml文件并将其用作Android中的资源吗 - Can I add my own .xml file and use it as a resource in Android 如何使我的.css和.js文件与我在Android上的WebView中加载的html代码一起使用 - How to make my .css and .js file work with my html code loaded in a WebView on Android 我想使用SQLIGHT如何使用Eclipse Android将db文件设置到我的项目中 - I want to use SQLIGHT how can I set a db file into my project using eclipse android (android)如何在android上读取txt文件中的单词? - (android)How can I read word in my txt file on android? 如何将Gradle项目编译为可以在Android应用程序中使用的jar文件 - How to compile gradle project to a jar file I can use in my Android application 如何在android studio webview中使用HTML文件输入? - How can I use the HTML file input in android studio webview?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM